1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$.fn.scrollEnd = function(callback, timeout) {
    $(this).scroll(function(){
      var $this = $(this);
      if ($this.data('scrollTimeout')) {
        clearTimeout($this.data('scrollTimeout'));
      }
 
      $this.data('scrollTimeout'setTimeout(callback,timeout));
    }); // 스크롤종료시를 감지하는 스크립트
};
 
 
$(window).scrollEnd(function(){
    // Todo Script
}, 2000);
cs


'퍼블리싱 > JS & JQ' 카테고리의 다른 글

스크롤 막기 JQ  (0) 2018.11.09
JS에서 미디어쿼리를 사용하는 matchMedia()  (0) 2018.11.01
JQuery API  (0) 2018.11.01
컬러박스 사용법  (0) 2018.11.01
윈도우 팝업띄우기  (0) 2018.11.01

+ Recent posts