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

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -