弹出层 自动消失的弹出层
XML/HTML Code
- <div class="mui-content-padded" style="text-align: center;">
- <button id="alertBtn" type="button" class="zbox-btn zbox-btn-blue zbox-btn-outlined">警告消息框</button>
- <button id="confirmBtn" type="button" class="zbox-btn zbox-btn-blue zbox-btn-outlined">确认消息框</button>
- <button id="toastBtn" type="button" class="zbox-btn zbox-btn-blue zbox-btn-outlined">自动消失提示框</button>
- <button id="load" type="button" class="zbox-btn zbox-btn-blue zbox-btn-outlined">加载中</button>
- <div id="info" onclick="$.DialogByZ.Close()">关闭加载</div>
- </div>
JavaScript Code
- <script>
- ///
- $("#alertBtn").click(function(){
- $.DialogByZ.Alert({Title: "提示", Content: "您的请求失败",BtnL:"确定",FunL:alerts})
- })
- $("#confirmBtn").click(function(){
- $.DialogByZ.Confirm({Title: "", Content: "投资前需开通第三方存管账户</br>确保资金安全",FunL:confirmL,FunR:Immediate})
- })
- $("#toastBtn").click(function(){
- $.DialogByZ.Autofade({Content: "感谢您对我们的支持"})
- })
- $("#load").click(function(){
- $.DialogByZ.Loading('../../images/loader-green.gif')
- })
- ///
- function confirmL(){
- $.DialogByZ.Close();
- $.DialogByZ.Alert({Title: "提示", Content: "您要求稍后开通",BtnL:"确定"})
- }
- //
- function alerts(){
- $.DialogByZ.Close();
- }
- function Immediate(){
- //location.href="http://www.baidu.com"
- window.open("http://www.freejs.net")
- }
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_627.html