The js below reveals a div based on the amount(size) of checkboxes vselected and it works fine. The checkboxes themselves are consecutive dates. What I need is to make sure that the dates selected are in consecutive order – ie 07/04, 07/05, 07/06 e.t.c. If the dates are not in consecutive order then the div does not reveal(show).
$('input[type=checkbox]').change(function(){
if($('input:checked').size() > 4){
$("#hideocrp").show();
}
else {
$('#hideocrp').hide()
}
});
You can use the following code to achieve your goals:
Live demo | Demo source
Edit:
Try using this code to do a relaxed search of a consecutive checkbox match.
Live demo | Demo source
Edit2:
To solve your second issue, just use
Demo | Source
To test against