I’m trying to create a jQuery content slider that will eventually look like this old 37Signals tourpage for Basecamp: http://cl.ly/2K2l1e010w0b3q1g261N (sadly, they changed the site TODAY when the updated Basecamp).
I basically want to have multiple content sliders on one page. Currently clicking the links in one sidebar makes both content areas slide.
And the fiddle: http://jsfiddle.net/saltcod/dm2dn/
Thanks for the help
Terry
Something tells me there’s a cleaner way to do this, however the following works. It finds the index of the link clicked, and then does the slider animation based on that. jsFiddle example.
jQuery:
//handle nav click
$(“.nav a”).click(function(e) {
Note that the feeling I have about an easier way probably involves changing the layout and adding other elements to wrap the content separately.
UPDATE
Here’s new jQuery to handle any number of groups and links:
jsFiddle example. The jQuery changes are minor and the only HTML changes were wrapping each group of list/divs in a wrapper div with the class of group like this: