SiteKickr Web Development

Replace submit buttons with a spinner on click

This has the dual purpose of letting the user know that the website is "processing", while not allowing them to click the submit button twice.

jQuery

var image = $('<img src="/img/spinner.gif" />'); // preload the spinner
$('input').click(function() {
  $(this).parent().append('<img src="/img/spinner.gif" />');
  $(this).hide();
});