treehouse : what would you like to learn today?
Web Design Web Development iOS Development

bxslider will not stop auto play when clicking a navigation link

  • I am having an issue where the slider will not stop auto play when I click a link on my navigation menu. I start the slider via:

    $('.bxslider1').bxSlider({auto: true,autoControls: true});

    It auto plays and works, but if I try to stop the slider by creating an onclick function or .click() jQuery like:

    $(".nav-portfolio").click(function() { slider = $('.bxslider1').bxSlider(); slider.stopAuto(); });

    It seems to do something for a split second and then start again. The reason I need to stop the slider is, I am using jQuery waypoints for anchor links to scroll smooth horizontally, and the panels start moving back and fourth by 1 or 2 pixels (which i disabled the slider and found it to be the cause) and its really annoying for the user.

    Any help would be appreciated.

  • try these options under 'Auto' http://v3.bxslider.com/options/