Hello there i have a problem. Suppose i have two type checkbox(person and company). If i submit form without checked any person or company checkbox then jQuery give me alert. Otherwise submit form. Here is my code given..
$(document).ready(function(){
$('#submit').click(function() {
if( $('.com:checked').length < 1 .or $('.son:checked').length < 1 ) {
alert('Please select at least one category');
$('form').submit(function(){
return false;
});
} else {
$('form').unbind('submit');
}
});