Simplemodal jquery 问题
我使用的是简单的模块 jquery 插件,它很棒,但我有一个关于此的小问题。
我想关闭当前模块窗口并在执行一些ajax后打开相同的窗口,但它确实关闭并打开。
我使用了以下代码。
<script language="javascript" type="text/javascript" >
jQuery(document).ready(function()
{
jQuery('a.delete').click(function(){
id = jQuery(this).attr('rel');
$.ajax({
type: "POST",
url: '<?=base_url()?>cart/delete/'+id+ '/',
cache: false,
success: function(data) {
alert(id);
// jQuery('<div id="ajax-popup"></div>').hide().appendTo('body').load('<?php echo site_url('cart');?>').modal();
$.modal.impl.close();
}
});
return false;
});
});
</script>
$.modal.impl.close();命令不再起作用
你能帮我解决这个问题吗? 谢谢 乌梅什
I was using simple module jquery plugins, its great but I have one small issues regarding this.
I want to close the current module window and open same after executing some ajax, but it does close and open.
I used the following code.
<script language="javascript" type="text/javascript" >
jQuery(document).ready(function()
{
jQuery('a.delete').click(function(){
id = jQuery(this).attr('rel');
$.ajax({
type: "POST",
url: '<?=base_url()?>cart/delete/'+id+ '/',
cache: false,
success: function(data) {
alert(id);
// jQuery('<div id="ajax-popup"></div>').hide().appendTo('body').load('<?php echo site_url('cart');?>').modal();
$.modal.impl.close();
}
});
return false;
});
});
</script>
The $.modal.impl.close(); command does not work anymore
Could you please help me regarding this?
Thanks
Umesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我查看了该插件的网站,没有看到任何提及 $.modal.impl.close();但仅限于 $.modal.close();所以可能这个功能已经过时了,没有包含在最新版本中。
两者有什么区别?我想 modal.close() 应该可以工作。
我不明白你到底想执行什么:你不想真正关闭对话框,而只是隐藏它,然后在经过一些处理后再次显示它?如果我理解错了,你能说得更明确一点吗?
祝你今天过得愉快 ;)
I looked over the website of the plugin, and didn't see any mention of $.modal.impl.close(); but only of $.modal.close(); So maybe this function is outdated and not included in the latest version.
What is the difference between the two? I guess modal.close() should work anyway.
I didn't understand what you are exactly trying to perform : you don't want to really close the dialog box but just hide it and then show it again after some treatment? If I misunderstood, could you be more explicit please?
Have a nice day ;)