/* //弹出tips提示层 参数 oId : 弹出提示层的对象如:$("#o"); meg : 提示文字; callback : 回调函数,function(){ alert("here")} times : 提示层显示的时间 pos : 提示层出现位置, 1:上,2:右,3:下,4:左 */ function poptips(oId,meg,callback,times,pos){ var postion = $.isNumeric(pos) ? pos : 1; //默认出现在元素上面 postion = postion<1 || postion>4 ? 1 : postion; var t = $.isNumeric(times) ? times : 2500; layer.tips(meg, oId, { anim: 6, time: t, tips: [postion, '#444444'], //还可配置颜色 end : function(){ if( $.isFunction(callback) ){ callback(); } } }); return false; } //弹出msg提示层 function popmsgbox(meg,times,icon,callback){ var t = $.isNumeric(times) ? times : 1500; var ico = $.isNumeric(icon) ? icon : 6 var msgbox = layer.msg( meg, { offset : "20%", icon: ico, shade: [0.65, '#f7f7f7'], time:t }, function(){ if( $.isFunction(callback) ){ callback(); } } ); return false; } //弹出iframe框架 ============================================================================= function popIframe( title, url, w, h, offsets, sft, mx, shadeArr ){ w = w ? w : 650; w = $.isNumeric(w) ? w+"px" : w; h = h ? h : 600; h = $.isNumeric(h) ? h+"px" : h; offsets = offsets ? offsets : "10%"; sft = $.isNumeric(sft) ? parseInt(sft) : 3; sft = (sft<=0 || sft>6) ? 3 : sft; mx = mx == false ? false : true; var Shade = $.isArray(shadeArr) && shadeArr.length>0 ? shadeArr : [0.55, "#000000"]; layer.open({ type: 2, title : title, offset : offsets, shade: Shade, area: [w, h], maxmin: mx, anim : sft, content: url }); } //弹出确认操作提示框 function popConfirm(meg, callback){ layer.open({ title : "操作提示", content: meg, icon: 3, btn: ['确认', '取消'], offset : "20%", shade: [0.5, '#f7f7f7'], shadeClose: false, yes: function(index){ layer.close(index); if( $.isFunction(callback) ){ callback(); } } }); } //弹出简易型确认操作提示框 function simpleConfirm(meg, callback){ var msgbox = layer.msg( meg, { offset : "20%", shade: [0.3, '#f7f7f7'], time: 20000, //20s后自动关闭 btn: ['确认', '取消'], yes:function(){ layer.close(msgbox); if( $.isFunction(callback) ){ callback(); } } }, function(){} ); } $(document).ready(function(e) { layer.config({ moveType : 1 /* , skin: 'layer-ext-moon', //第三方皮肤 extend:'skin/moon/style.css' */ }); });