-
基本应用
演示代码:
var loading_all_id = null;
$("#btn_all").click(function () {
loading_all_id = $(document.body).NZ_Loading("show");
setTimeout(function () {
$(document.body).NZ_Loading("hide", { loadingid: loading_all_id });
}, 5000);
});
-
局部显示
演示代码:
var loading_locally_id = null;
$("#btn_loading_locallyshow").click(function () {
loading_locally_id = $("#testarea").NZ_Loading('show', { content: "模块加载中..." });
});
$("#btn_loading_locallyhide").click(function () {
$("#testarea").NZ_Loading('hide', { loadingid: loading_locally_id });
});
-
自定义加载内容
演示代码:
var loadingid_con = $(document.body).NZ_Loading('show', { content: "正在获取信息,请稍后..." });
setTimeout(function () {
$(document.body).NZ_Loading("hide", { loadingid: loadingid_con });
}, 6000);
-
iframe加载应用
var iframe = $('');
$(this).before(iframe);
var loadingid_iframe = iframe.NZ_Loading("show", { content: "正在打开新世界..." });
iframe.children("iframe").load(function () {
iframe.NZ_Loading("hide", { loadingid: loadingid_iframe });
});
-
参数说明
("show"/"hide"//显示/关闭
,{
autohide:false//是否自动检测页面加载完毕(自动关闭)
,cotent:"正在加载..."//加载显示内容
})