jquery中lightBox插件图片显示如何跳出iframe窗口,在父页面展现?
现在左侧窗口没有没遮住。请问如何解决?用的是lightBox插件,欢迎高手解答----------------------------------------------...
现在左侧窗口没有没遮住。请问如何解决?用的是lightBox插件,欢迎高手解答
--------------------------------------------------------------------------------------------------------
<a href="<%=basePath %><s:property value="#sr.resourcePath"/>" data-title="<s:property value="#sr.title"/>" data-lightbox="example-1"> <img src="<%=basePath %><s:property value="#sr.resourcePath"/>" class="img_book" onerror="imgError('pic',this)"> <p class="name_book"><s:property value="#sr.title"/> </p> </a>
------------------------------------------------------------------------------------------------------------------------ 展开
--------------------------------------------------------------------------------------------------------
<a href="<%=basePath %><s:property value="#sr.resourcePath"/>" data-title="<s:property value="#sr.title"/>" data-lightbox="example-1"> <img src="<%=basePath %><s:property value="#sr.resourcePath"/>" class="img_book" onerror="imgError('pic',this)"> <p class="name_book"><s:property value="#sr.title"/> </p> </a>
------------------------------------------------------------------------------------------------------------------------ 展开
2个回答
展开全部
然后在c.prototype.start函数里加上这个
window.myleft=$(window.parent.document).find("#myleft");
window.myright=$(window.parent.document).find("#myright");
if(window.myleft.length>0){
window.myleft.css({"left":"-600px"});
window.myleftwidth=$(window.myleft).width();
window.myright.find("body").css({"padding-left":window.myleftwidth+"px"});
window.myright.css({"width":"100%"});
}
c.prototype.end里的改成
this.$overlay.fadeOut(this.options.fadeDuration,function(){
if(window.myleft.length>0){
window.myleft.css({"left":"0px"});
window.myright.find("body").css({"padding-left":"0px"});
window.myright.css({"width":$(window).width()-window.myleftwidth+"px"});
}
});
我的左右两侧是用position: absolute;定位的
window.myleft=$(window.parent.document).find("#myleft");
window.myright=$(window.parent.document).find("#myright");
if(window.myleft.length>0){
window.myleft.css({"left":"-600px"});
window.myleftwidth=$(window.myleft).width();
window.myright.find("body").css({"padding-left":window.myleftwidth+"px"});
window.myright.css({"width":"100%"});
}
c.prototype.end里的改成
this.$overlay.fadeOut(this.options.fadeDuration,function(){
if(window.myleft.length>0){
window.myleft.css({"left":"0px"});
window.myright.find("body").css({"padding-left":"0px"});
window.myright.css({"width":$(window).width()-window.myleftwidth+"px"});
}
});
我的左右两侧是用position: absolute;定位的
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询