源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

jQuery实现摸拟alert提示框

  • 时间:2021-11-02 17:17 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:jQuery实现摸拟alert提示框
页面调用JS:
    $(document).ready(function() {
      $("#delete_without_layer").click(function () {
        $.tConfirm.open({body:'Are you sure to delete?',type:'confirm',onOk:function(){
          alert("yes");
        }});
      });
      $("#delete_with_layer").click(function () {
        $.tConfirm.open({overlay:true,body:'Are you sure to delete?',type:'confirm',onOk:function(){
          alert("yes");
        }});
      });
      $("#information").click(function () {
        $.tConfirm.open({body:'This is confirm box based on fancybox!',type:'info',onOk:function(){
          alert("yes");
        }});
      });
      $("#success").click(function () {
        $.tConfirm.open({body:'Save success!',type:'success',onOk:function(){
          alert("yes");
        }});
      });
      $("#error").click(function () {
        $.tConfirm.open({body:'Some fields are wrong!',type:'error',onOk:function(){
          alert("yes");
        }});
      });   $("#warning").click(function () {
        $.tConfirm.open({body:'Someone login, it\'s not real user!',type:'warning',onOk:function(){
          alert("yes");
        }});
      });
    });

[img]http://files.jb51.net/file_images/article/201605/201605221549381.jpg[/img] Figure 1. common confirm [img]http://files.jb51.net/file_images/article/201605/201605221549402.jpg[/img] Figure 2. confirm box with layer [img]http://files.jb51.net/file_images/article/201605/201605221549413.jpg[/img] Figure 3. error box [img]http://files.jb51.net/file_images/article/201605/201605221549434.jpg[/img] Figure 4. success box [img]http://files.jb51.net/file_images/article/201605/201605221549445.jpg[/img] Figure 5. warning box 源码下载: [url=https://github.com/tomlxq/jquery-confirm]https://github.com/tomlxq/jquery-confirm[/url]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部