I have four check boxes and when I click more than two of them then under the last clicked checkbox one I should get a <div><a href="#">Compare</a> </div>
contains a compare link. It may be randomly. I tried to do this using JQuery and below is my code.I need improve one. The issue is I need when two of check box will check under the last one I should get visible the hidden div.
$(document).ready(function() {
$('input[type=checkbox]').change(function(){
if($('input[name=checkbox1]').size() == 1){
$('#checkbox1_compare').show();
}
else {
$('#checkbox1_compare').hide();
}
})
});