Javascript plug in Noty gives error Javascript plug in Noty gives error jquery jquery

Javascript plug in Noty gives error


I have just come across this problem. It turns out to be because the variable name noty is the same as the exported function name noty.

var n = noty({text: 'testing 123'});

Simply changing the variable name fixes it for me.


In addition to renaming the variable make sure you include the layout js file. The default is top, so if it's not specified in the options you'll need to include noty/layouts/top.js. If you specify any other layouts include the appropriate layout js files.