javascriptjqueryjcarousellite

jcarousellite stop on click


hi i have a page with jcarousellite showing some images and scrolling auto after every 5 seconds i want to stop the scroll when i click on any image in carousel

here is what i am trying to do

$(document).ready(function() {
    $('.slider_images').jCarouselLite({
        btnNext: "#next",
        btnPrev: "#prev",
        auto:  3000         
    }); 

    $(".slider_images img").click(function(){


        $('.slider_images').jCarouselLite({
            btnNext: "#next",
            btnPrev: "#prev",
            scroll: false       
        }); 


    });
});

Solution

  • I am so sorry for very late response. My problem was solved. We can achieve stop on click property very easily by changing pauseOnHover option of jcarousellite. If you see the implementation of pauseOnHover, its something like this:

    o.pauseOnHover ? ul.hover(function (){ paused == 1 }, function (){paused=0}) : "";
    

    we can achieve stop on click by changing ul.hover to ul.click

    o.pauseOnHover ? ul.click(function (){ paused == 1 }, function (){paused=0}) : "";
    

    Have a Nice Day.