foreground image fade away effect
On Mac OS X, there is an effect for which I would like to know the name (so that I can't find information about it). It is slightly transparent message that appears in the center of the screen, and then quickly fades away.
For example, with Google Chrome, selecting the option "Warn Before Quitting" and briefly typing the combo key command+Q will make it appear, as shown on the screenshot available here.
My goal is to reproduce this effect usi开发者_如何学Gong jQuery. Any ideas?
EDIT: It is the same effect as command+tab to switch application focus.
Is this something like what you want? I don't know what exactly it's called. http://jsfiddle.net/eF5hZ/1/
If you want to make it show, then fade away after a period of time, you can use the .delay() method that jquery provides.
$("#showmessage").click(function(e) {
$("#message").show().delay(1000).fadeOut();;
});
This will show the message, then fade it out after a second.
http://jsfiddle.net/UzvWc/1/
精彩评论