jQuery colorbox 에서 브라우저 스크롤 없애기
페이지 정보
작성자 관리자 (61.♡.24.46) 작성일 15-11-27 11:01 조회 5,124 댓글 0본문
jquery 라이트박스 플러그인 중의 하나인 colorbox 를 사용하는 경우,
colorbox 레이어가 떠 있을 때에도 브라우저가 스크롤이 된다.
브라우저가 스크롤 되는 것을 막으려면, jquery 스크립트를 이용하면 된다.
jQuery(document).ready(function(){
$(document).bind('cbox_open', function() {
$('html').css({ overflow: 'hidden' });
}).bind('cbox_closed', function() {
$('html').css({ overflow: '' });
});
});
** 출처 : https://wordpress.org/support/topic/disable-background-scrolling-when-colorbox-layer-is-active
colorbox 레이어가 떠 있을 때에도 브라우저가 스크롤이 된다.
브라우저가 스크롤 되는 것을 막으려면, jquery 스크립트를 이용하면 된다.
jQuery(document).ready(function(){
$(document).bind('cbox_open', function() {
$('html').css({ overflow: 'hidden' });
}).bind('cbox_closed', function() {
$('html').css({ overflow: '' });
});
});
** 출처 : https://wordpress.org/support/topic/disable-background-scrolling-when-colorbox-layer-is-active
추천0
댓글목록 0
등록된 댓글이 없습니다.