Fancybox 2.1.3阻止来自haivng滚动条的iframe [英] Fancybox 2.1.3 preventing iframe from haivng scrollbars
问题描述
我使用fancybox.js版本2.1.3将外部内容放入iframe。我这样做是通过放置url后跟div id(例如 http://somesite.com#about ) ,这似乎工作,但问题是我还没有发现停止fancybox滚动。防止滚动是必要的,因为我将在同一外部页面上放置几个div ID,然后将它们放在带有fancybox的iframe中,我不想让观众能够在iframe中向下滚动以查看其他div div外部页面。
I am using fancybox.js version 2.1.3 to place external content into an iframe. I am doing this by placing the url followed by a div id (e.g. http://somesite.com#about), this seems to work however the problem is I have not found away to stop fancybox from scrolling. preventing scrolling is necessary since i will be placing several div ids on the same external page and then placing them in iframes with fancybox, and i do not want to give the viewer the ability to scroll down within the iframe to view other div ids on this external page.
//fancybox window script
$(document).ready(function() {
$(".various").fancybox({
type :'iframe',
scrolling : 'no',
maxWidth : 800,
maxHeight : 400,
fitToView : true,
width : '70%',
height : '70%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
});
});
推荐答案
您可以使用帮助程序禁用滚动,如下所示:
You can disable the scrolling by using a helper as follows:
iframe : {
scrolling : 'no'
}
这篇关于Fancybox 2.1.3阻止来自haivng滚动条的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!