For some reason I can’t change HTML after a javascript timeout. Here’s the code I’m using:
setTimeout("$(\"#display p\").html(newDescription);", 250);
Is there something wrong with this? If I remove the timeout, the script works perfectly. Here’s that version:
$("#display p").html(newDescription);
I’m running Chrome 22 if that makes any difference
yes the first argument should be function.
OR
Additionally
newDescriptionmust be in a scope accessible to your function.