|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml" debug="true"> |
| 3 | + <head> |
| 4 | + <title>jGrowl Examples</title> |
| 5 | + <link rel="stylesheet" href="../jquery.jgrowl.css" type="text/css"/> |
| 6 | + <style type="text/css"> |
| 7 | + html, |
| 8 | + body { |
| 9 | + font-family: "Helvetica neue", Helvetica, Arial, sans-serif; |
| 10 | + padding: 0; |
| 11 | + margin: 0; |
| 12 | + } |
| 13 | + |
| 14 | + h1, h2, h3, h4, h5 { |
| 15 | + margin-top: 2px; |
| 16 | + margin-bottom: 2px; |
| 17 | + } |
| 18 | + |
| 19 | + .jGrowl .manilla { |
| 20 | + background-color: #FFF1C2; |
| 21 | + color: navy; |
| 22 | + } |
| 23 | + |
| 24 | + .jGrowl .flora { |
| 25 | + background: #E6F7D4 url(flora-notification.png) no-repeat; |
| 26 | + -moz-border-radius: 0px; |
| 27 | + -webkit-border-radius: 0px; |
| 28 | + opacity: 1; |
| 29 | + filter: alpha(opacity = 100); |
| 30 | + width: 270px; |
| 31 | + height: 90px; |
| 32 | + padding: 0px; |
| 33 | + overflow: hidden; |
| 34 | + border-color: #5ab500; |
| 35 | + } |
| 36 | + |
| 37 | + .jGrowl .flora .message { |
| 38 | + padding: 5px; |
| 39 | + color: #000; |
| 40 | + } |
| 41 | + |
| 42 | + .jGrowl .flora .header { |
| 43 | + background: url(flora-header.png) no-repeat; |
| 44 | + padding: 5px; |
| 45 | + } |
| 46 | + |
| 47 | + .jGrowl .flora .close { |
| 48 | + background: url(flora-close.png) no-repeat; |
| 49 | + padding: 5px; |
| 50 | + color: transparent; |
| 51 | + padding: 0px; |
| 52 | + margin: 5px; |
| 53 | + width: 17px; |
| 54 | + } |
| 55 | + |
| 56 | + #dummyNav { |
| 57 | + position: fixed; |
| 58 | + background: green; |
| 59 | + width: 100%; |
| 60 | + height: 50px; |
| 61 | + } |
| 62 | + |
| 63 | + </style> |
| 64 | + <script type="text/javascript" src="http://code.jquery.com/jquery.js"></script> |
| 65 | + <script type="text/javascript" src="../jquery.jgrowl.js"></script> |
| 66 | + <script type="text/javascript"> |
| 67 | + |
| 68 | + // In case you don't have firebug... |
| 69 | + if(typeof console === "undefined") { |
| 70 | + console = { log: function() { } }; |
| 71 | + } |
| 72 | + |
| 73 | + (function($){ |
| 74 | + |
| 75 | + $(function(){ |
| 76 | + |
| 77 | + $.jGrowl.defaults.closerTemplate = "<div>[ xxxxx ]</div>"; |
| 78 | + $.jGrowl.defaults.appendTo = "div#dummyNav"; |
| 79 | + |
| 80 | + $.jGrowl("This message is sticky and clickable", { |
| 81 | + sticky: true, |
| 82 | + click: function(msg) { |
| 83 | + alert("You clicked me"); |
| 84 | + } |
| 85 | + }); |
| 86 | + |
| 87 | + $.jGrowl("This message is sticky and clickable"); |
| 88 | + $.jGrowl("This message is sticky and clickable"); |
| 89 | + $.jGrowl("This message is sticky and clickable"); |
| 90 | + $.jGrowl("This message is sticky and clickable"); |
| 91 | + $.jGrowl("This message is sticky and clickable"); |
| 92 | + $.jGrowl("This message is sticky and clickable"); |
| 93 | + }); |
| 94 | + })(jQuery); |
| 95 | + |
| 96 | + </script> |
| 97 | + </head> |
| 98 | + <body> |
| 99 | + <div id="dummyNav">I'm the dummy navigation</div> |
| 100 | + |
| 101 | + <h1>Append To Another DOM-Object</h1> |
| 102 | + </body> |
| 103 | +</html> |
0 commit comments