Stack-overflow-style message bar
I want to create a message bar like th开发者_JAVA百科e one shown on top of the stack overflow site when you have new notifications. Anyone know how to do this in a good way in Rails/CSS/jQuery, or know of a tutorial somewhere?
Here's an example with jQuery:
http://jsfiddle.net/pJmb7/13/
Note that I can't seem to get the z-index for the close button to supersede the "result" image in jsFiddle so it's pretty hard to find the clickable area of the "x" to demonstrate the closing. But there's just enough sticking out at the bottom for it to work.
If this was not in the jsFiddle sandbox it would appear at the top of the screen.
Basic working event-based example
try the jQuery tab, hope that will work :)
精彩评论