Coffee CupA very clever little jQuery function here that I’ve gone and lifted from some deep, dark domain of the Web.

Essentially what it does is prevent accidental double form submission (which could for example happen if it appears to the user that nothing is happening after he already pressed on the submit button once), by assigning a function to the submit action of each and every form on a particular page. The function simply disables any image or submit buttons that are bound to that form, thereby preventing a secondary click in one foul swoop.

var $that = $(this);
$that.find("input[type='image'],input[type='submit']").attr("disabled", "true");});

Like I said, pretty clever.