1234567891011121314151617181920212223242526272829303132333435363738 |
- <!doctype html>
- <html lang="zh">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>带提示音的jQuery消息提示框插件</title>
- <link rel="stylesheet" type="text/css" href="css/normalize.css" />
- <link rel="stylesheet" type="text/css" href="css/default.css">
- <link rel="stylesheet" type="text/css" href="css/jquery.notify.css">
- <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'>
- <!--[if IE]>
- <script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
- <![endif]-->
- </head>
- <body>
- <article class="htmleaf-container">
-
- <button id="btn"><i class="fa fa-commenting-o"></i> 打开消息通知框</button>
-
- </article>
-
- <script src="http://libs.useso.com/js/jquery/1.11.0/jquery.min.js" type="text/javascript"></script>
- <script>window.jQuery || document.write('<script src="js/jquery-1.11.0.min.js"><\/script>')</script>
- <script type="text/javascript" src="js/jquery.notify.js"></script>
- <script>
- $.notifySetup({sound: 'audio/notify.wav'});
- $(function(){
- $("#btn").click(function(){
- $('<p>Hello World!</p>').notify();
- $('<p>Hello World!</p>').notify('error');
- $('<p>Hello World!</p>').notify({sticky: true});
- });
- });
-
- </script>
- </body>
- </html>
|