A-A+

基于jQuery的jBar消息提醒插件使用例子

2016年01月13日 前端设计 暂无评论 阅读 7 views 次

jBar 是一个简单和轻量级 jQuery 通知栏,JBar 允许您创建简单的行动要求,使其用户可以查看在您的网站顶端的信息。用户可以通过单击功能区切换栏的可见性

jBar是一个简单的jQuery插件,允许你在你的网站上弹出提示消息层,没有过多的动画效果和特效,比较实用的消息提示插件,可以支持自定义消息的颜色和显示效果以及位置。

使用方法:

1、引入插件文件和jQuery库

  1. <link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/>  
  2. <script src="jquery-1.3.2.js" type="text/javascript"></script>  
  3. <script src="jquery.bar.js" type="text/javascript"></script>  

2、通过一个jQuery选择器触发提示效果

  1. $("#msgup").bar({  
  2.     color            : '#1E90FF',  
  3.     background_color : '#FFFFFF',  
  4.     removebutton     : false,  
  5.     message          : 'Your profile customization has been saved!',  
  6.     time             : 4000  
  7. });  

可选参数

你可以定义以下属性:

color: Color of the notification message

background_color: Background color of the notification bar

position: The values “top” and “bottom” define the position of the bar

removebutton: Boolean defining if there should be a closing cross

message: Your customized message

time: Time in milliseconds for notification to disappear

标签:

给我留言