Skip to content

Instantly share code, notes, and snippets.

@aaronmoodie
Created March 26, 2012 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronmoodie/2203478 to your computer and use it in GitHub Desktop.
Save aaronmoodie/2203478 to your computer and use it in GitHub Desktop.
$('#submitForm').click(function(event) {
var total = 0;
$('select.sandwich').each(function() {
total = total + $(this).attr('value');
});
if(total < 10 ) {
event.preventDefault();
$('div.minRequired').css('display', 'block');
} else {
$('div.minRequired').css('display', 'none');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment