Issue
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?
Solution
You can just set the delay
very high:
$.notifyBar({
cls: "error",
html: "message"
});
And then close the bar with:
$(".jquery-notify-bar").slideUp();
Answered By – Alex Peattie
Answer Checked By – David Goodson (BugsFixing Volunteer)