简体   繁体   English

Jquery:noty确认消息

[英]Jquery : noty confirmation message

I am using JQuery noty plugin . 我正在使用JQuery noty插件 I need Confirmation message box, how ever the Confirmation Message Box comes fine along with Buttons , but the Buttons Click Event are not working. 我需要确认的消息框, 确认消息框中按钮以及如何终究来罚款,但按钮的Click事件不工作。 When i click any of the Buttons . 当我点击任何按钮 It gives me HTTP Error 404.0 - Not Found. 它给我HTTP Error 404.0 - Not Found. The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. error. 错误。 Below is my code. 以下是我的代码。

 noty({
        text: 'Are you sure?',
        type: 'confirm',
        buttons: [
           {
               addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {
                   $noty.close();
                   noty({ text: 'You clicked "Ok" button', type: 'success' });
               }
           },
           {
               addClass: 'btn btn-danger', text: 'Cancel', onClick: function ($noty) {
                   $noty.close();
                   noty({ text: 'You clicked "Cancel" button', type: 'error' });
               }
           }
        ]
    })

whats wrong with this. 什么是错的。

Check if the scripts are really loaded via firebug/devtools and if your paths are correct. 检查脚本是否真的通过firebug / devtools加载,以及路径是否正确。 Tested your code and it worked for me. 测试了你的代码,它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM