My form have following checkbox and I want to tick the option to show an alert with checked values, but there is nothing happen to show up the alert when I ticked it:
<form id="booking_form">
<input type="checkbox" name="bType[]" id="bType" value="A,200"> Type A - USD200<br>
<input type="checkbox" name="bType[]" id="bType" value="B,150"> Type B - USD150<br>
<input type="checkbox" name="bType[]" id="bType" value="C,100"> Type C - USD100<br>
<input type="checkbox" name="bType[]" id="bType" value="D,50"> Type D - USD50<br>
</form>
and I have JQ script:
<script>
$("input[type=checkbox]:checked").each ( function() {
alert ( $(this).val() );
});
</script>
please advise, thanks.