jQuery实现摸拟alert提示框
更新时间:2016年05月22日 15:54:23 投稿:hebedich
这篇文章主要介绍了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"); }}); }); });
Figure 1. common confirm
Figure 2. confirm box with layer
Figure 3. error box
Figure 4. success box
Figure 5. warning box
源码下载:
https://github.com/tomlxq/jquery-confirm
您可能感兴趣的文章:
- jquery.alert 弹出式复选框实现代码
- 基于jQuery的弹出消息插件 DivAlert之旅(一)
- 基于jQuery的消息提示插件 DivAlert之旅(二)
- JQuery的Alert消息框插件使用介绍
- jQuery)扩展jQuery系列之一 模拟alert,confirm(一)
- 基于jquery的弹出提示框始终处于窗口的居中位置(类似于alert弹出框的效果)
- 用Jquery重写windows.alert方法实现思路
- jQuery绑定事件不执行但alert后可以正常执行
- 自编jQuery插件实现模拟alert和confirm
- jQuery提示插件alertify使用指南
- jquery SweetAlert插件实现响应式提示框
相关文章
jQuery.cookie.js实现记录最近浏览过的商品功能示例
这篇文章主要介绍了jQuery.cookie.js实现记录最近浏览过的商品功能,结合实例形式分析了基于jQuery.cookie.js插件创建cookie及保存浏览记录的操作技巧,需要的朋友可以参考下2017-01-01animate动画示例(泪奔的小孩)及stop和delay的使用
实现原理:停止动画,当一个元素有一个动画队列时,停止的是当前动画,紧接着执行下一个动画,具体代码如下,感兴趣的朋友可以参考下哈,希望对你学习jquery动画有所帮助2013-05-05jQuery 验证插件 Web前端设计模式(asp.net)
asp.net下用户注册页面的验证代码,花了点时间将验证做成一个jQuery插件,希望对需要的朋友有所帮助。2010-10-10Lazy Load 延迟加载图片的jQuery插件中文使用文档
Lazy Load 是一个用 JavaScript 编写的 jQuery 插件. 它可以延迟加载长页面中的图片. 在浏览器可视区域外的图片不会被载入, 直到用户将页面滚动到它们所在的位置. 这与图片预加载的处理方式正好是相反的2012-10-10详解Jquery 遍历数组之$().each方法与$.each()方法介绍
这篇文章主要介绍了详解Jquery 遍历数组之$().each方法与$.each()方法介绍 ,具有一定的参考价值,有兴趣的可以了解一下。2017-01-01
最新评论