jQuery IE7 模态怪异
我有 2 个通过单击按钮触发的模式窗口。它们在除 IE7 之外的所有浏览器中都能正常工作(尚未在此以下进行测试)
我只能在演示中演示基本功能,但这里是。第一个模式对话框工作正常,如果您单击“从服务器加载数据”,它应该关闭。第二种模式根本不起作用。在演示中,当您单击“从服务器加载数据”时,它不会执行任何操作。 (在我的本地副本上,当我单击它时,它会删除模态背景 div,wtf?)
当您首先打开第二个模态对话框窗口时,真正的曲线球就会出现。然后两种模式都可以正常工作。这真的让我很困扰(该死的 IE7)
我正在使用 .live 作为模态窗口中的表行点击。我需要保持这种状态,以便将数据正确发送到表单。
I have 2 modal windows that are triggered from button clicks. They work fine in all browsers except IE7 (haven't tested below this)
I was only able to demo the basic functionality in the demo but here goes. The first modal-dialog works fine, if you click on "loading data from server" it should close. The second modal does not work at all. On the demo it does nothing when you click "loading data from server". (on my local copy when I click it removes the modal background div, wtf?)
The real curveball comes in when you open the second modal-dialog window first. Then both modals work fine. This is really getting to me (Damn you IE7)
I am using .live for the table row clicks within the Modal window. I need this to stay that way in order for the data to be sent to the form correctly.
The fiddle is here: http://jsfiddle.net/clintongreen/5DJxv/10/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下代码在 IE7 中不起作用:
这之前在所有浏览器中都有效,但是当我们实现 DataTables.js 时,我的代码不再仅使用两个表的 1 个模态对话框。所以我创建了 2 个模式对话框,一旦完成,上面的代码似乎只在 IE7 中发生冲突(问题 6 也是如此)。无论如何,在咬牙切齿之后,我将上面的代码减少到下面,现在一切正常:)
The following code was not working in IE7:
This was working previously in all browsers but when we implemented DataTables.js my code no longer worked using only 1 modal-dialog for both tables. So I created 2 modal-dialogs, once this was done the above code seemed to conflict only in IE7 (and prob 6 too). Anyway after much gnashing of teeth I reduced the above code to below, and it all works fine now :)