
jQuery Growl 是一个设计用于在浏览器中提供信息提示消息的插件。
更多参数说明
delayOnHover:当鼠标悬停在提示上时,阻止其消失(true | false - 默认值:true)
duration:提示显示的持续时间(毫秒)(默认值:3200)
fixed:是否应固定提示而不是自动关闭(true | false - 默认值:false)
location:提示的位置('tl' | 'tr' | 'bl' | 'br' | 'tc' | 'bc' - 默认值:'tr')
size:提示的大小('small' | 'medium' | 'large' - 默认值:'medium')
style:提示的样式('default' | 'error' | 'notice' | 'warning' - 默认值:'default')
主要js与解析
<script> (function () { $(function () { $.growl({ title: "Growl", location: "tc", message: "The kitten is awake!" }); $('.error').click(function (event) { event.preventDefault(); event.stopPropagation(); return $.growl.error({ location: "tc", message: "The kitten is attacking!" }); }); $('.notice').click(function (event) { event.preventDefault(); event.stopPropagation(); return $.growl.notice({ location: "tc", message: "The kitten is cute!" }); }); return $('.warning').click(function (event) { event.preventDefault(); event.stopPropagation(); return $.growl.warning({ location: "tc", message: "The kitten is ugly!" }); }); }); }).call(this); </script>