I have implemented fancybox2 on a dev site.
When I engage the fancybox (click the link etc) the whole html shifts behind it - and goes to the top. I have it working fine in another demo, but when I drag the same code to this project it jumps to the top. Not only with the links to inline divs, but also for simple image gallery.
Has anyone experienced this?
jQuery(document). ready(function($) { $('button'). on('click', function() { $. fancybox(); }); });
fancybox is designed to display images, video, iframes and any HTML content. For your convenience, there is a built in support for inline content and ajax.
fancybox({ beforeLoad: function() { this. title = $(this. element). attr('caption'); } });
This can actually be done with a helper in Fancybox 2.
$('.image').fancybox({ helpers: { overlay: { locked: false } } });
http://davekiss.com/prevent-fancybox-from-jumping-to-the-top-of-the-page/
Jordanj77 is correct but easiest solution is to just go to stylesheet jquery.fancybox.css
and comment out the row saying overflow: hidden !important;
in section .fancybox-lock
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With