For example, when someone clicks on a button.
views:
84answers:
4
+1
A:
In 1.4 you can use the .delay() function. Here's the documentation for that:
Alternately you could look into the native javascript setTimeOut() function.
Alex Mcp
2010-03-22 02:19:49
A:
If you're using the JQuery 1.4+, you could try
$('#myDiv').fadeIn('medium').delay(5000).fadeOut('medium');
You can remove the fadeIn if the div is visible straight away.
keyboardP
2010-03-22 02:20:13
+1
A:
Use the delay function available since 1.4
From the docs: http://api.jquery.com/delay/
$('#foo').fadeIn(400).delay(5000).fadeOut(400);
Eoin
2010-03-22 02:23:52