Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery : noty confirmation message

I am using JQuery noty plugin. I need Confirmation message box, how ever the Confirmation Message Box comes fine along with Buttons, but the Buttons Click Event are not working. When i click any of the Buttons. It gives me 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.

like image 282
Shahid Iqbal Avatar asked Aug 03 '26 22:08

Shahid Iqbal


1 Answers

Check if the scripts are really loaded via firebug/devtools and if your paths are correct. Tested your code and it worked for me.

like image 70
invad0r Avatar answered Aug 06 '26 12:08

invad0r