jquery chekbox selected
- by Dejan.S
Hi I'm having some problems with jquery checkbox selected. I want to do a task when the checkbox is selected. my code for this is
$(document).ready(function() {
if ($('#chxGetText').is(':checked')) {
alert("OK");
}
});
<input id="chxGetText" type="checkbox" />
But nothing happen when I check the checkbox. Any ideas?