I’m new to JS and am writing a notification plug-in. Currently I’m calling this plug-in like so:
$.notifyBar({
cls: "error",
html: "message"
});
By default it stays for 2 seconds and disappears. What I want to do is, if delay set to 0, then notifybar will not disappear automatically. I want it to disappear it programmatically, in ajax success function. How can I modify this plug-in to realize my idea?
You can just set the
delayvery high:And then close the bar with: