asp.net - Twitter notification ajax bar, how did they do it? -
I'm trying to get that cool, Ajax sliding bar that Twitter (its slightly transparent, white)
I tried to see html / css, but it seems that they inject dynamically different DOM layers.
Do anyone know how they implemented it?
I really want to know how to do it.
Run this code in firebug or on the document .ready ()
< Code> $ ("id id = 'notification' & gt; notification text here & lt; / div & gt;"). CSS ("Position": "Fixed", Top: "0 Pixel", Left: "0 Pixel", Height: "20px", Width: "100%", Background Color: "#CCCC", Color: "Blue" Padding: "5px", FontWeight: "bold", Text Alliance: "Center", Opacity: "0.5"}) .appendTo ("body");
And you should have an instant notification time ...
If you are familiar with jQuery (which I think is you, because with the question jquery Tag), you can change the CSS and HTML values according to your needs ...
To do this, you will do this below:
$ (" & Lt; div id = 'notification' & gt; notification text here & lt; / div & gt; "). Background: "# cccccc", color: "blue", padding ("position": "fixed", top: "0 pixels", left: "0 pixels", height: "20px", width: "100%" background collar : "5px", FontWeight: "bold", Text Alliance: "Center", Display: "None", // "Notice this new value Opacity:" 0.5 "}) .appendTo (" body " ); $ ("# Notification") slideDown ("Slow"). // & lt; - This animation code is
Disclaimer : I got a quick thing soon, if it does not work, then it will not be surprising in IE.
Comments
Post a Comment