- 注册时间
 - 2011-9-27
 - 最后登录
 - 2014-1-9
 - 在线时间
 - 138 小时
 - 阅读权限
 - 150
 - 积分
 - 7799
 - 帖子
 - 339
 - 精华
 - 1
 - UID
 - 130
  
 
 
 
   
 
 
 | 
 本帖最后由 Snail 于 2011-10-28 17:56 编辑  
 
看图: 
 
 
 
jquery.message.cssjquery.message.js- /**
 
 -  *  type: Information reminder types; The rid_device_info: common information, error messages, warn as freely though they are: warning: the information
 
 -  *
 
 -  *  isVanish:  Whether timing hidden. Default automatic hidden
 
 -  *  vanish:         Disappear time, the default for 3 seconds (3000 milliseconds)
 
 -  *  content:  prompt message.
 
 -  *
 
 -  * @author wucc Created on 2011.07.13
 
 -  */
 
 - (function($){
 
 -     $.fn.message = function(options){
 
 -         var defaults = {
 
 -             type    :"info",// 信息提示类型;info:普通信息,error:错误信息,warn:警告信息
 
 -                         isVanish:true, // 是否定时隐藏 默认自动隐藏
 
 -                         vanish  :1500, // 消失时间 ,默认为1500毫秒)
 
 -                         content :escape("提示信息")
 
 -         }
 
 -                 var div=$(this);
 
 -         var options = $.extend(defaults, options);
 
 -         this.each(function(){
 
 -                         if('object' == typeof(options))
 
 -                         {
 
 -                                 var type = options.type.toLowerCase();
 
 -                                 if(type == "info"){
 
 -                                         var html ='<dl id="system-message"><dt class="message">消息</dt><dd class="message message"><ul><li>'+options.content+'</li></ul></dd></dl>';
 
 -                                         div.hide();
 
 -                                         div.html(html)
 
 -                                         div.show("1000");
 
 -                                 }else if(type == "error"){
 
 -                                         var html ='<dl id="system-message"><dt class="error">错误</dt><dd class="error message"><ul><li>'+options.content+'</li></ul></dd></dl>';
 
 -                                         div.hide();
 
 -                                         div.html(html)
 
 -                                         div.show("1000");
 
 -                                 }else if(type == "warn"){
 
 -                                         var html ='<dl id="system-message"><dt class="notice">注意</dt><dd class="notice message"><ul><li>'+options.content+'</li></ul></dd></dl>';
 
 -                                         div.hide();
 
 -                                         div.html(html)
 
 -                                         div.show("1000");
 
 -                                 }else if(type == "editor"){
 
 -                                         var html = '<div style="height: auto;" class="editor_hint" id="qzEditor_1_tips"><div class="editor_hint_cont">'+options.content+'</div></div>';
 
 -                                         div.hide();
 
 -                                         div.html(html)
 
 -                                         div.show("1000");
 
 -                                         
 
 -                                 }
 
 -                         
 
 -                                 if(options.isVanish){
 
 -                                         setTimeout(function(){div.hide(options.vanish,function(){div.html("");})},options.vanish);
 
 -                                 }
 
 -                         }
 
 -         });
 
 -                 
 
 -     };
 
 - })(jQuery);
 
  复制代码 
 
message.zip
(66.88 KB, 下载次数: 4)
 
 |   
 
- 
1
查看全部评分 
 
- 
 
 
  
 
 |