Is it possible, using jQuery, to fire off an event to set a div tag\'s text after n. seconds?
Thanks! George
I've been using the following jQuery plugins below for this. Delay can be used with chained functions, notNow can't.
Delay
http://plugins.jquery.com/project/delay
$('#animate-this').fadeIn().delay(500).fadeOut();
notNow
http://plugins.jquery.com/project/notNow
$.notNow(2000, function() {
alert('woolsworth');
});
var doIt = function() {
$("div.my").text("My message");
}
setTimeout(doIt, 3000);
if you're using jQuery 1.4, you can always do:
$(function() {
$('#divId').delay(3000).text('New Text');
});