Reputation: 17348
For some reason I am stuck on this JavaScript setTimeout
problem. Could someone direct me as to where I went wrong? FireBug gives me an error stating:
"loadComplete is not defined".
I only have a snippet of it; the part which is having the problem:
<script type="text/javascript">
function loadComplete() {
$('div#formContainer').fadeTo(2000, 1);
}
window.onload = function() {
setTimeout('loadComplete()', 4000);
}
</script>
If it makes any difference I do have this loaded in an external JS file.
Upvotes: 0
Views: 925
Reputation: 7544
setTimeout(loadComplete, 4000);
that should fix up the problem :)
Upvotes: 3