javascript

jQuery 화면 끝단, 이벤트

기계새 2016. 9. 26. 17:00

$(window).scroll(function () {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight != 0) {
bottom();
} else {

top();

}