View Single Post
Old 12-10-2012, 03:48 PM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
All of your DIVs have the common class "page", which is a good thing. But I see 8 links and only 3 DIVs with class "page"? Is it only a partial extract?

Nevertheless, try this
Code:
$('#my-carousel-2 > ul > li > a').click(function() {
   var whichLink = $(this).parent().index(); // 0 to 7
   // hide all pages first
   $('.page').hide();
   // then show only DIV with correct index
   $('.page').eq(whichLink).show();
});
devnull69 is offline   Reply With Quote
Users who have thanked devnull69 for this post:
prajwala (12-11-2012)