如何使用 jquery 知道 iframe 已准备好...
我正在使用 jquery 挤出机菜单(http://pupunzi.com/#mb.components/mb.extruder/extruder.html)。该菜单具有打开/关闭时的回调函数。我试图仅使用特定页面的回调函数来显示/隐藏 iframe 内的 div,除了 IE 之外,它工作正常。在 IE 中,它显示 jquery 文件错误。我希望问题出在 iframe 就绪状态。如果可以在 jquery 中得到它。我想它也可以在 ie 中工作..
var frame=$('#customer').contents();
$("#extruderLeft").buildMbExtruder({
position:"left",
width:300,
extruderOpacity:.9,
hidePanelsOnClose:true,
accordionPanels:true,
onExtOpen:function(){
frame.find("#atm_page").css("margin-left", "270px");
frame.find('#tele').css("display", "none");
}
},
onExtContentLoad:function(){},
onExtClose:function(){
frame.find("#atm_page").css("margin-left", "0px");
frame.find("#tele").css("display", "block");
}
}
});
我过去两天尝试过这个。我希望我能从这里得到帮助。请帮帮我...
i am using jquery extruder menu (http://pupunzi.com/#mb.components/mb.extruder/extruder.html). That menu has callback functions on open/close. I am trying to show/hide a div inside the iframe using that callback functions for a particular page only, it work fine except IE. In IE it says the error with the jquery file. i hope the problem is with iframe ready state. if can get that in jquery. i think it will work in ie too..
var frame=$('#customer').contents();
$("#extruderLeft").buildMbExtruder({
position:"left",
width:300,
extruderOpacity:.9,
hidePanelsOnClose:true,
accordionPanels:true,
onExtOpen:function(){
frame.find("#atm_page").css("margin-left", "270px");
frame.find('#tele').css("display", "none");
}
},
onExtContentLoad:function(){},
onExtClose:function(){
frame.find("#atm_page").css("margin-left", "0px");
frame.find("#tele").css("display", "block");
}
}
});
i trying this one past 2 days. i hope i can get help from here. plz help me out...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你在那个 javascript 中有两个太多的右大括号,我想你想要更多这样的东西:
IE 的 javascript 解释器在语法方面往往比大多数解释器更挑剔,例如臭名昭著的“额外的尾随逗号”问题。
You have two too many closing braces in that javascript, I think you want something more like this:
IE's javascript interpreter tends to be pickier than most when it comes to syntax, the infamous "extra trailing comma" problem for example.
尝试
-
Try
-