Wednesday, 21 August 2013

BX slider. Adding and removing class to previous slides

BX slider. Adding and removing class to previous slides

I am trying to add a class to each slide navigation bullet that is before
the current slide.
Right now it adds a class if you click the next button. However I cant
figure out how to remove the class when the previous button is clicked.
Something along the lines of
$(document).ready(function($) {
function(){
if (slide <= currentSlide) {
$('.bx-pager .active').addClass('blueylooey');
} else {
$('.bx-pager .active').removeClass('blueylooey');
}
});
This is what I have working so far: http://jsfiddle.net/mreee/xVnQY/

No comments:

Post a Comment