最新消息:

第94款插件:activebar2.js消息通知条插件

Jquery插件 杨红伟 10562浏览 0评论

一、插件介绍

该插件可以跨浏览器平台,其依附于HTML5和CSS3语法,基于jQuery框架开发,该插件的功能是:在紧靠浏览器的最顶部,以消息栏提醒的方式通知用户自定义内容。当网站有重要、紧急的事情宜需要通知网友时,使用该插件是一个不错的选择。

Activebar2插件仅有10KB,使用十分方便,只需要调用插件自带的activebar()方法,并在方法中设置显示的内容即可!

这款插件对于网站维护工程师特别管用,一句话全搞定!

二、插件图片示例

三、插件作者下载地址

作者:Jakob Westhoff (德国人)
官网:http://www.westhoffswelt.de/
本站JS下载地址:http://www.ijquery.cn/js/activebar2.js  http://www.ijquery.cn/js/activebar2.min.js

四、插件参数

'background': '#FFFF00',//背景颜色
'border': '#c8c8c8', //边框颜色
'highlight': '#FF0000', //鼠标移到activebar上的背景色
'font': 'Bitstream Vera Sans,verdana,sans-serif',//字体
'fontColor': '#000000',//字体颜色
'fontSize': '12px',//字体大小
'icon': 'images/activebar-information.png',//左边的图标,一般是警告
'button': 'images/activebar-closebtn.png', //右边的图标,一般是关闭
'url': null  //超链接,即点击后跳转的位置

四、使用教程

该插件没有HTML代码,只要引用下边的JS代码即可以!

<script src="http://www.ijquery.cn/js/jquery-1.7.2.min.js"></script>
<script src="http://www.ijquery.cn/js/activebar2.js" type="text/javascript"></script>
<script type="text/javascript">
	$(function() {
		//设置消息条通知内容
		var $strTip = '温馨提示:明天有大雨,请大家出行时携带好雨具!';
		
		//在div元素中显示通知内容
		$('<div></div>').html($strTip).activebar({
			'font': 'serif', //字体名
			'url': 'http://www.weather.com.cn/', //点击内容的URL                        
            'icon': 'http://www.ijquery.cn/study/demo/activebar2/images/activebar-information.png',
            'button': 'http://www.ijquery.cn/study/demo/activebar2/images/activebar-closebtn.png',
		});
	});
</script>


Warning: Use of undefined constant PRC - assumed 'PRC' (this will throw an Error in a future version of PHP) in /www/wwwroot/www.ijquery.cn/wp-content/themes/d8-3.0/comments.php on line 17
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址