jqModal关闭,重新打开问题
使用两个表单元素调用 Jquery Modal。还有一个关闭模式的选项。一种情况是用户关闭模式,然后可以返回。
但是当用户回来时,表单元素不起作用,并且模式只是在单击后关闭。
$('#test').jqmAddClose('#test');
我的假设是,当模式关闭时,它会破坏元素。从而表现得不稳定。
我尝试隐藏模式而不是关闭它,但这不会删除叠加层。
另一个选项是为每个实例分配一个唯一的。
任何其他建议。
谢谢。
A Jquery Modal is called with two form elements. There is also an option to close the modal. One scenario is that the user would close the modal, and can come back to it.
But when the user come back, the form elements do not work, and the modal just closes upon a click.
$('#test').jqmAddClose('#test');
My assumption is that when the modal closes, it destroys the elements. Thus behaving erratically.
I tried Hiding the modal rather than closing it, but this does not remove the overlay.
The other option is to assign a unique for each instance.
Any other suggestions.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我在问题中指出的那样,问题是浏览器删除元素,而不是重新创建它们。每次调用模态时分配一个新的 id 解决了这个问题。
The issue was as I noted in the question, browser deleting the elements, and not re creating them. Assigning a new id each time modal was called solved the problem.