var timer = null;
$(window).on('scroll', function() {
clearTimeout(timer);
timer = setTimeout(function() {
alert('прокрутка прекратилась');
}, 100);
});
$.fn.scrollStopped = function(callback) {
var $this = $(this), self = this;
$this.scroll(function(){
if ($this.data('scrollTimeout')) {
clearTimeout($this.data('scrollTimeout'));
}
$this.data('scrollTimeout', setTimeout(callback,250,self));
});
};