Hi
I am trying to change the type of <input> from submit to image using jquery so that the image is displayed during the AJAX request instead of the button. I am doing:
$(document).ajaxStart(function(){$("#submit_btn").removeAttr("type").attr("image");});
and my HTML is:
<input type="submit" name="submit" class="button" id="submit_btn" value="Send" src="images/sending.gif" />
Am I doing it the right away? And if so, what's wrong because this ain't working :p
.hide()and.show()so:$(document).ajaxStart(function(){$("#submit_btn").hide(); $("#sending").show(); });Now on.ajaxStartevent the button hides and the image shows- with proper CSS positioning it gives the illusion of being replaced with an image. So it works- but not sure if it's the best way!