I\'m trying to show a simple spinner gif meanwhile a submit is being executed (it takes a bit because I have to establish some communications with providers via web services
Have you tried loading the image on document ready, only having it hidden. Then display it in your function? This way, the image is already loaded and spinning.
$(document).ready(function() {
$("body").prepend('');
$("body").prepend("");
});
$('#gds_form').submit(function() {
var pass = true;
//some validations
if(pass == false){
return false;
}
$("#overlay, #PleaseWait").show();
return true;
});