add navigation buttons with highlight to jQuery Cycle
Posted
by
JJ Nold
on Stack Overflow
See other posts from Stack Overflow
or by JJ Nold
Published on 2010-12-21T22:51:59Z
Indexed on
2010/12/21
22:54 UTC
Read the original article
Hit count: 167
jQuery
I am currently using jQuery cycle to display featured projects. I currently have the next and prev buttons setup, I also have four rounded buttons in between. I would like them to function as both a link to the corresponding slide as well as add a class to the button who's slide is currently active. I have the nav setup and the active class setup I just need the jQuery.
You can see the code at http://jjnold.com/dev in the main slider at the top.
I was thinking it's probably something like this to assign the class but I'm not sure how to link to the corresponding slide and have them work together. Any help is greatly appreciated.
$('.featuredNavInt a').click(function()
{
$('.featuredNavInt a').removeClass('active');
$(this).addClass('active');
});
© Stack Overflow or respective owner