时间:2021-05-26
jquery弹出层插件,支持消息提示、错误提示、确认框提示等。交互体验度非常好,大家都用微信支付、支付宝等完成用户体验度非常的不错。本插件至少要支持IE9+。使用方式也非常的简单、粗暴,很符合大众的jquery插件使用方法。
先给大家演示效果:
在线预览 源码下载
代码如下:
<h1>Sweet Alert</h1><h2>A beautiful replacement for JavaScript's "Alert"</h2><button class="download">Download</button><h3>So... What does it do?</h3><p>Here's a comparison of a standard error message. The first one uses the built-in <strong>alert</strong>-function, while the second is using <strong>sweetAlert</strong>.</p><div class="showcase normal"><h4>Normal alert</h4><button>Show error message</button><h5>Code:</h5><pre><span class="attr">alert</span>(<span class="str">"Oops... Something went wrong!"</span>); </pre><div class="vs-icon"></div></div><div class="showcase sweet"><h4>Sweet Alert</h4><button>Show error message</button><h5>Code:</h5><pre><span class="attr">sweetAlert</span>(<span class="str">"Oops..."</span>, <span class="str">"Something went wrong!"</span>, <span class="str">"error"</span>);</pre></div><p>Pretty cool huh? SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet. It's even highly customizeable, as you can see below!</p><h3>More examples</h3><p class="center">In these examples, we're using the shorthand function <strong>swal</strong> to call sweetAlert.</p><ul class="examples"><li class="message"><div class="ui"><p>A basic message</p><button>Try me!</button></div><pre><span class="attr">swal</span>(<span class="str">"Here's a message!"</span>)</pre></li><li class="title-text"><div class="ui"><p>A title with a text under</p><button>Try me!</button></div><pre><span class="attr">swal</span>(<span class="str">"Here's a message!"</span>, <span class="str">"It's pretty, isn't it?"</span>)</pre></li><li class="success"><div class="ui"><p>A success message!</p><button>Try me!</button></div><pre><span class="attr">swal</span>(<span class="str">"Good job!"</span>, <span class="str">"You clicked the button!"</span>, <span class="str">"success"</span>)</pre></li><li class="warning confirm"><div class="ui"><p>A warning message, with a function attached to the "Confirm"-button...</p><button>Try me!</button></div>以上就是本文通过代码给大家详解jquery SweetAlert插件实现响应式提示框,希望对大家有所帮助。
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
今天给大家推荐一款不错的超酷消息警告框–SweetAlert;SweetAlert是一款不需要jQuery支持的原生js提示框,风格类似bootstrap。它的
本文实例讲述了js实现右下角提示框的方法。分享给大家供大家参考。具体实现方法如下:实现右下角提示框的Jquery插件(popup.js)复制代码代码如下://兼
摘要:之前给大家介绍过用CSS来实现带箭头的提示框,今天我们来点不太一样的,本文将分享几款带箭头提示框。qtipqTip是一种先进的提示插件,基于jQuery框
本文实例讲述了jQuery实现仿新浪微博浮动的消息提示框。分享给大家供大家参考。具体如下:这是一款jQuery实现的仿新浪微博新消息提示框效果,支持智能浮动定位
JavaScript制作一个简单的提示框插件下面是制作的提示框插件文件window.myPlugin=window.myPlugin||{};window.my