javascript - settimeout not working i dont know why -
$('form[name=addform]').submit(function() { if(error == true){ return false; }else{ $('#loading').empty(); $('#loading').append("<img src = './images/ajax-loader.gif'/>"); $('#loading').show(); settimeout(function(){ return true; }, 4000); } error = false; });
i need load gif image before executes return true. not use ajax please
i'm not sure trying accomplish, code won't work. settimeout()
not pause function has been called from, nor return
statement in callback affect it.
Comments
Post a Comment