Stop slider from scrolling when out of viewport?

Solution:

There are two things you should take care of:

1) detecting wether slider is visible for user. There are several solutions for this, for example this or this

2) stopping/starting slider depending on slider visibility. Combining it all together, the code would look like this. It is conceptual and untested, but the idea is clear, I think.

jQuery(window).scroll(function($) {

    function isScrolledIntoView(elem)
    {
        var docViewTop = $(window).scrollTop();
        var docViewBottom = docViewTop + $(window).height();

        var elemTop = $(elem).offset().top;
        var elemBottom = elemTop + $(elem).height();

        return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));
    }


    if (isScrolledIntoView($('.rd_testimonials'))){
        $('.rd_testimonials').carouFredSel({auto: false});
    } else {
        $('.rd_testimonials').carouFredSel({auto: true});
    }

});