(function($){ jQuery.Pop = jQuery.Pop || {}; jQuery.Pop = function(Html,Type,Callback) { var BoxId=id_(); var PopType={ alert: { Title: "提示", Btn:{ yes:{vla:"我知道了",ope:function(){if(Callback){Callback();Close()}else{Close()}}} } }, confirm:{ Title: "注意", Btn:{ yes:{vla:"确定",ope:function(){if(Callback){Callback();Close()}else{Close()}}}, no:{vla:"取消",class:"btn btn-currency",ope:function(){Close()}} } }}; var IType = Type ? Type instanceof Object ? Type : PopType[Type] || {} : {}; var Config = $.extend(true, { Title:"来自Pop插件的通知", Close:true, Animation:"layerFadeIn", BoxBg:true, BoxDrag:true, BoxBgopacity:0.6, ZIndex:99999, Class:false, Btn:{ yes:{vla:"我知道了",class:"btn btn-primary",ope:function(){Close()}}, } },IType); var $Box=$("
").css({
width:"100%",
"margin": "0",
"padding": "0",
}).html(Html);
$BoxImg=$("").attr({"src":Config.Img});
$("body").append($Box.append($BoxHtml));
if(Config.Img){$Box.prepend($BoxImg);}
if(Config.ImgWh){
var i=Config.ImgWh.split("*");
$BoxImg.attr({"width":i[0],"height":i[1]})
}
$Box.css({"margin-left":-$Box.outerWidth()*0.5,"margin-top":-$Box.outerHeight()*0.5,"z-index":Config.ZIndex});
if(Config.StartOn){Config.StartOn();}
setTimeout(function(){
$Box.fadeOut("show",function(){
$Box.remove();
});
if(Config.EndOn){Config.EndOn();}
},Config.Time*1000);
};
})(jQuery);