I use DOM window script for Lightboxes on my website. Is there any way to block scroll on main page when Lightbox appears and unblock when it disappears?
Or, maybe, you can advice better Lightbox script?
Thanks.
User this to disable or enable window scrollbar :
document.body.style.overflow="hidden";
on show your lightbox and
document.body.style.overflow="visible";
on hiding your lightbox.
but if your are really looking for a better lightbox library you can try this jQuery plugin :
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.