简体   繁体   English

jQuery通知插件

[英]jQuery notification plug-in

I'm new to js. 我是js的新手。 so need help with notification plug-in. 所以需要通知插件的帮助。 Currently I'm calling this plug-in like that 目前我正在调用这个插件

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

By default it stays for 2 seconds and dissapears. 默认情况下,它会停留2秒钟并消失。 What I wanna do is, if delay set to 0, then notifybar will not dissapear automatically. 我想做的是,如果延迟设置为0,那么notifybar将不会自动消失。 I wanna disappear it programmatically, in ajax success function. 我想以编程方式在ajax成功函数中消失它。 How can I modify this plug-in to realize my idea? 如何修改此插件以实现我的想法?

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

You can just set the delay very high: 您可以将delay设置得非常高:

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

And then close the bar with: 然后关闭酒吧:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM