/** * 弹窗 * @author 鹿文学 */ ;(function(d){d.fn.pop=function(g){var a=this;a.options=d.extend(!0,{text:"",speed:800,main:"pop-wrap"},g);a.open=function(b,c){b=b||a.options.speed;c&&e(c);a.fadeIn(b);return a};a.close=function(b){b=b||a.options.speed;b=f(b);a.fadeOut(b);setTimeout(function(){a.find("."+a.options.main).html("")},b+100);return a};a.clear=function(){a.find("."+a.options.main).html("");return a};var e=a.add=function(b){0"+ b+"");return a};a.msg=function(b,c){var d=f(a.options.speed);c=c||2E3;a.html("").append(""+b+"").stop(!0).fadeIn(d);setTimeout(function(){a.fadeOut(d)},c);return a};var f=function(a){if("string"==typeof a)switch(a){case "slow":a=600;break;case "normal":a=400;break;case "fast":a=200}return parseInt(a)};e(a.options.text);return this}})(window.jQuery);