清风徐来
知是行之始,行是知之成

Jquery Notification Plugin

Work jQuery 约 1 分钟

一款简单易用的jquery通知插件。会在页面顶部show出成功,失败,警告,和信息提示框。

基本设置

1,引入jquery和本插件(notification libraries)

<script src="jquery.js"></script>
<script  src="js/jquery_notification_v.1.js"> </script> 

2,引入notification的css文件

<link href="css/jquery_notification.css" type="text/css" rel="stylesheet"/> 

3,调用showNotification()方法,并传递参数

showNotification(params); 

使用例子

<html>
<head>
<link href="css/jquery_notification.css" type="text/css" rel="stylesheet"/>
<script src="jquery.js"></script>
<script type="text/javascript" src="js/jquery_notification_v.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
showNotification({
message: "This is sample notification message",
type: "success",
autoClose: true,
duration: 5
});
});
</script>
</head>
<body>
..................
..................
</body>
</html>

说明:原插件 ZIP 附件已经失效,不再提供下载;本文保留的完整示例代码仍可直接参考。