Hello,
i've a group of checkboxs built within a "Custom Element" as the following:
I want to trigger the change event when click on one of them returning the checkbox selected value.
I've tried so:
but it stops with error: "Ready is not a function".
If I test the same code on a online JQuery Simulator (such as http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide) it works!
Thanks
Guido
i've a group of checkboxs built within a "Custom Element" as the following:
<input type="checkbox" class="MyCheck" value="1"/>
<input type="checkbox" class="MyCheck" value="2"/>
<input type="checkbox" class="MyCheck" value="3"/>
I want to trigger the change event when click on one of them returning the checkbox selected value.
I've tried so:
$(document).ready(function() {
$('.MyCheck').click(function() {
if ($(this).is(':checked')) {
alert($(this).val());
}
});
})
but it stops with error: "Ready is not a function".
If I test the same code on a online JQuery Simulator (such as http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide) it works!
Thanks
Guido