Created
July 28, 2014 12:54
-
-
Save onefriendaday/8c38732f10c8f7a2d8d9 to your computer and use it in GitHub Desktop.
Verify if all options are selected in looks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('#look-form').submit(function(e){ | |
var form = e; | |
var prevented = false; | |
$('.product-id:checked').each(function(){ | |
if($(this).prev().val() == '' && !prevented){ | |
form.preventDefault(); | |
alert('Por favor selecione todas as opções'); | |
prevented = true; | |
} | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment