jquery弹出层插件,支持消息提示、错误提示、确认框提示等。交互体验度非常好,大家都用微信支付、支付宝等完成用户体验度非常的不错。本插件至少要支持ie9+。使用方式也非常的简单、粗暴,很符合大众的jquery插件使用方法。
先给大家演示效果:
在线预览 源码下载
代码如下:
sweet alerta beautiful replacement for javascript's alertdownloadso... what does it do?here's a comparison of a standard error message. the first one uses the built-in alert-function, while the second is using sweetalert.
normal alertshow error messagecode:alert(oops... something went wrong!);
sweet alertshow error messagecode:sweetalert(oops..., something went wrong!, error);
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!
more examplesin these examples, we're using the shorthand function swal to call sweetalert.
a basic message
try me!
swal(here's a message!)
a title with a text under
try me!
swal(here's a message!, it's pretty, isn't it?)
a success message!
try me!
swal(good job!, you clicked the button!, success)
a warning message, with a function attached to the confirm-button...
try me!
以上就是本文通过代码给大家详解jquery sweetalert插件实现响应式提示框,希望对大家有所帮助。