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:
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
Post a Comment