Monday, July 30, 2012

settimeout – Message that appears for a second and then dissapears Javascript



Dumb question. I am trying to get a message to appear and dissapear after a couple of seconds. I just thought I would have a timeout function and at the end I would just append an empty string.



setTimeout(function() {
$(\'#resultDivSE\').append(\'<b><p style=\"font:color:rgb(128,0,128)\">\' + data + \'</p></b>\');
}, 1000)
$(\'#resultDivSE\').append(\'\');


That doesn\’t appear to be working. Am I missing something here… Also, How would you set the color of the text?






Rating: 5 out of 5 based on 5 ratings



The post settimeout – Message that appears for a second and then dissapears Javascript appeared first on Javascript ASK.






via Javascript ASK http://javascriptask.phpfogapp.com/settimeout-message-that-appears-for-a-second-and-then-dissapears-javascript.html

No comments:

Post a Comment