Noty jQuery plugin buttons on confirmation -


i tried adding buttons noty confirm, seems not work, ideas why?

i took code noty's website under subsection buttons:

http://needim.github.io/noty/

the alert seems work fine without buttons, it's when attempting add buttons, nothing show up!

here's code:

function sure() {     var n = noty({         text: 'are sure?',         type: 'confirm',         dismissqueue: false,         layout: 'center',         theme: 'defaulttheme'  buttons: [     {addclass: 'btn btn-primary', text: 'ok', onclick: function($noty) {          // = button element         // $noty = $noty element          $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'});       }     }   ]       })   } 

comma missing between theme:'defaulttheme' , buttons.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -