A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
It looks like that case is needed for compatibility with multi-selects. I agree it needs to be optimized though. Perhaps this instead? Note - untested, just off the top of my head.
$field.find('option:selected').each(function() {
val += $(this).val();
});
It looks like that
case
is needed for compatibility with multi-selects. I agree it needs to be optimized though. Perhaps this instead? Note - untested, just off the top of my head.