Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

making an automatic image slider

I was wondering how to make an automatic slider for images on the front page. Any ideas? Thanks.

9 Answers

Matt Campbell
Matt Campbell
9,767 Points

You'll need jQuery, CSS and HTML/PHP to make a simple one. There's a tonne of resources out there for the varying styles. Just don't expect it to take you 30 minutes to learn. Took me like 2 days to make my first one but it is a bit more then your usual images slide left every 5 seconds.

Kevin Korte
Kevin Korte
28,149 Points

Do you want to make one from scratch, or just implement one you can download and use?

doesn't matter but i would like to know both.

i just want something simple and wont take me forever to use.

yea this makes better sense.

when I am saving .js file do I name it what ever, or do I name it something specific like we do with index.html

Kevin Korte
Kevin Korte
28,149 Points

You can name it what you want. If you're using a JS file from a slider you downloaded, I'd just leave that name alone for the file alone.

Matt Campbell
Matt Campbell
9,767 Points

Name it whatever but you need to make sure that any references, links, calls etc etc match that name if required.

There's a course on here about jQuery and another, albeit WordPress, that references use of flexslider.

ok thanks bros