标签:
toastr插件详细参考资料
项目地址:https://github.com/CodeSeven/toastr
使用方法
(1)添加引用
<!-- 消息提示 --> <link href="/assets/JS/plugins/bootstrap-toastr/toastr.min.css" rel="stylesheet" type="text/css" /> <!--消息提示--> <script type="text/javascript" src="/assets/JS/plugins/bootstrap-toastr/toastr.min.js"></script>
(2)常用使用示例
// Display an info toast with no title
toastr.info(‘Are you the 6 fingered man?‘)
// Display a warning toast, with no title
toastr.warning(‘My name is Inigo Montoya. You killed my father, prepare to die!‘)
// Display a success toast, with a title
toastr.success(‘Have fun storming the castle!‘, ‘Miracle Max Says‘)
// Display an error toast, with a title
toastr.error(‘I do not think that word means what you think it means.‘, ‘Inconceivable!‘)
// Immediately remove current toasts without using animation
toastr.remove()
// Remove current toasts using animation
toastr.clear()
// Override global options
toastr.success(‘We do have the Kapua suite available.‘, ‘Turtle Bay Resort‘, {timeOut: 5000})
jQuery - toastr消息提示插件(取代alter())
标签:
原文地址:http://www.cnblogs.com/aikewang/p/5691142.html