指定位置文字提示框,自动隐藏或者手动关闭
JavaScript Code
- <script>
- $(function() {
- // First alert
- $.bootstrapPurr('This is a simple "purr" which is draggable with the primary mouse. Drag me!');
- // Second alert shown after a delay of 1 second
- setTimeout(function() {
- $.bootstrapPurr('This is a "purr" with the type set to "success"', {
- type: 'success',
- delay_pause: true
- });
- }, 1000);
- // Third alert shown after a delay of 2 seconds
- setTimeout(function() {
- $.bootstrapPurr('This is a "purr" with the multiple options that have been set', {
- type: 'danger',
- align: 'center',
- width: 'auto',
- allow_dismiss: false
- });
- }, 2000);
- // Fourth alert shown after a delay of 3 seconds
- setTimeout(function() {
- $.bootstrapPurr('This is another "purr" that will display until manually closed', {
- type: 'info',
- align: 'left',
- delay: 0,
- stackup_spacing: 30
- });
- }, 3000);
- // Fifth alert shown after a delay of 4 seconds
- setTimeout(function() {
- $.bootstrapPurr('freejs.net', {
- type: 'danger',
- align: 'center',
- width: 'auto',
- allow_dismiss: true,
- allow_dismiss_type: 'hover'
- });
- }, 4000);
- });
- </script>
原文地址:http://www.freejs.net/article_jquerywenzi_518.html