代码拉取完成,页面将自动刷新
!function($) {
$.Huimodaltips = function(options, callback) {
var defaults = {
btn: ['确定'],
content:'弹窗内容',
title: '提示',
icon: '',
width: 400,
hasClose: false,
};
var options = $.extend({}, defaults, options);
var w= 0;
if (options.width=='auto'){
w ='400px';
}else{
w = options.width + 'px';
}
var htmlstr =
'<div id="modal-tips" class="modal hide modal-tips">'+
'<div class="modal-dialog" style="width:' + w + '">'+
'<div class="modal-content radius">'+
'<div class="modal-header">'+
'<div class="modal-title">' + options.title + '</div>';
if(options.hasClose) {
htmlstr +=
'<a class="close" data-dismiss="modal" aria-hidden="true" href="javascript:void();">×</a>';
}
htmlstr += '</div>'+
'<div class="modal-body">'+
'<div class="modal-tips-icon">' + options.icon + '</div>'+
'<div class="modal-tips-content">' + options.content + '</div>'+
'<div class="modal-btn-wrapper">'+
'<button class="btn btn-success size-M radius">' + options.btn[0]+'</button>'+
'</div>'+
'</div>'+
'</div>'+
'</div>'+
'</div>';
if ($("#modal-tips").length > 0) {
$("#modal-tips").remove();
}
$(document.body).append(htmlstr);
$("#modal-tips").modal("show");
$("#modal-tips .modal-btn-wrapper .btn").on("click",function(){
$("#modal-tips").modal("hide");
if(callback) {
callback();
}
});
}
}(window.jQuery);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。