Tural Ali
Tural Ali

Reputation: 23230

jQuery notification plug-in

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?

http://jsfiddle.net/YQaS4/5/

Upvotes: 0

Views: 309

Answers (1)

Alex Peattie
Alex Peattie

Reputation: 27637

You can just set the delay very high:

$.notifyBar({
  cls: "error",
  html: "message"
});

And then close the bar with:

$(".jquery-notify-bar").slideUp();

Upvotes: 2

Related Questions