手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jQuery实现摸拟alert提示框
jQuery实现摸拟alert提示框
摘要:页面调用JS:$(document).ready(function(){$("#delete_without_layer").click(f...

页面调用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"); }}); }); });

jQuery实现摸拟alert提示框1

Figure 1. common confirm

jQuery实现摸拟alert提示框2

Figure 2. confirm box with layer

jQuery实现摸拟alert提示框3

Figure 3. error box

jQuery实现摸拟alert提示框4

Figure 4. success box

jQuery实现摸拟alert提示框5

Figure 5. warning box

https://github.com/tomlxq/jquery-confirm

【jQuery实现摸拟alert提示框】相关文章:

实现placeholder效果的方案汇总

JQuery实现动态添加删除评论的方法

jQuery实现强制cookie过期方法汇总

jQuery实现不断闪烁文字的方法

jquery实现用户打分评分特效

js设置document.domain实现跨域的注意点分析

jQuery实现在列表的首行添加数据

jQuery实现控制文字内容溢出用省略号(…)表示的方法

nodejs实现获取某宝商品分类

javascript实现模拟时钟的方法

精品推荐
分类导航