Hi guys, I can't seem to figure out what might be the problem with my custom external nav controls. If I have it setup to just be an external nav I have no problems. As soon as I try to setup an 'active' class using the example provided with a 'cur' class it locks up and the slider no longer works. Any idea what I might be doing wrong?
Ignore the text, it's hidden using text indent and the id's are for placement. The Jquery I'm using is:
var nav = $('.gallery-nav a'),
updateNav = function(page){
nav
.removeClass('cur')
.eq(page).addClass('cur');
}
$('#slider').anythingSlider({
// If true, builds a list of anchor links to link to each panel
buildNavigation: false,
onInitialized: function(e, slider) {
updateNav(slider.currentPage-1);
},
// Callback before slide animates
onSlideBegin: function(e, slider) {
updateNav(slider.targetPage-1);
}
});
// set up external links
nav.click(function(){
var slide = $(this).attr('href').substring(1);
$('#slider').anythingSlider(slide);
return false;
});
Hi guys, I can't seem to figure out what might be the problem with my custom external nav controls. If I have it setup to just be an external nav I have no problems. As soon as I try to setup an 'active' class using the example provided with a 'cur' class it locks up and the slider no longer works. Any idea what I might be doing wrong?
I'm using:
Ignore the text, it's hidden using text indent and the id's are for placement. The Jquery I'm using is:
var nav = $('.gallery-nav a'), updateNav = function(page){ nav .removeClass('cur') .eq(page).addClass('cur'); }
$('#slider').anythingSlider({ // If true, builds a list of anchor links to link to each panel buildNavigation: false, onInitialized: function(e, slider) { updateNav(slider.currentPage-1); }, // Callback before slide animates onSlideBegin: function(e, slider) { updateNav(slider.targetPage-1); } });
// set up external links nav.click(function(){ var slide = $(this).attr('href').substring(1); $('#slider').anythingSlider(slide); return false; });
Thanks in advance! :)