javascript - How to get a value of input[type=checkbox] using jQuery and pretty checkbox plugin -
right have code on html part:
<div class="clearfix prettycheckbox labelright blue"> <input class="car_type" type="checkbox" value="16" name="" style="display: none;"> <a class="" href="#"></a> <label for="undefined"></label> </div> and have far in js:
$('.prettycheckbox').click(function () { var clickedvalue = $(this).//here need code input before alert('value ' + clickedvalue); }); so, need value (16; value="16") of input field inside of div.prettycheckbox clicked.
how that?
$('.prettycheckbox').click(function () { var clickedvalue = $(this).find(':checkbox').val(); alert('value ' + clickedvalue); });
Comments
Post a Comment