Simplemodal jquery 问题

发布于 2024-09-07 10:00:53 字数 867 浏览 0 评论 0原文

我使用的是简单的模块 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤独陪着我 2024-09-14 10:00:53

我查看了该插件的网站,没有看到任何提及 $.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 ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文