码迷,mamicode.com
首页 > Web开发 > 详细

jQuery - toastr消息提示插件(取代alter())

时间:2016-07-21 12:21:45      阅读:4698      评论:0      收藏:0      [点我收藏+]

标签:

 

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

(5)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!