您的位置:首页 > Web前端 > JQuery

【使用示例】jGrowl 消息弹出框的jQuery插件

2013-06-26 16:04 666 查看
来自:http://www.oschina.net/code/snippet_12_591

jGrowl用于制作消息弹出框的jQuery插件。产生效果的类似于Mac OSX系统中Growl事件通知框架。



// Sample 1:提示后自动消息
$.jGrowl("Hello world!");

// Sample 2:需要用户手动关闭
$.jGrowl("Stick this!", { sticky: true });

// Sample 3:增加标题
$.jGrowl("A message with a header", { header: 'Important' });

// Sample 4:指定在10秒后自动消失
$.jGrowl("A message that will live a little longer.", { life: 10000 });

// Sample 5:消失后有回调事件
$.jGrowl("A message with a beforeOpen callback and a different opening animation.", {
beforeClose: function(e,m) {
alert('About to close this notification!');
},
animateOpen: {
height: 'show'
}
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: