在右侧弹出层,弹出内容,一段时间后自动消失,可以打开多个
XML/HTML Code
- <div class='content'>
- <section class='example'>
- <p>
- <ul>
- <li>
- <a class='error' href='#'>Error!</a>
- </li>
- <li>
- <a class='notice' href='#'>Notice!</a>
- </li>
- <li>
- <a class='warning' href='#'>Warning!</a>
- </li>
- </ul>
- </p>
- </section>
- </div>
sample.js
JavaScript Code
- // Generated by CoffeeScript 1.6.3
- (function() {
- $(function() {
- $.growl({
- title: "Growl",
- message: "The kitten is awake!"
- });
- $('.error').click(function(event) {
- event.preventDefault();
- event.stopPropagation();
- return $.growl.error({
- message: "The kitten is attacking!"
- });
- });
- $('.notice').click(function(event) {
- event.preventDefault();
- event.stopPropagation();
- return $.growl.notice({
- message: "The kitten is cute!"
- });
- });
- return $('.warning').click(function(event) {
- event.preventDefault();
- event.stopPropagation();
- return $.growl.warning({
- message: "The kitten is ugly!"
- });
- });
- });
- }).call(this);
原文地址:http://www.freejs.net/article_jquerywenzi_179.html