I would let you know a simple jquery script to check if a checkbox or radio buttton is clicked or unclicked.
The code is pretty simple, So their is no explanation needed
Here is the checkbox
Here is the jquery code which will perform something after check and uncheck, you can add your custom function instead of alert.
if($('input[name=singledate]').is(':checked') == true ){
alert("checked");
}
else
{
alert("unchecked");
}
});
Thats it, help this blog to grow, visit other cool code links! :)
The code is pretty simple, So their is no explanation needed
Here is the checkbox
<input type="checkbox" id="singledate" name="singledate" value="Choose single day" />Single date
Here is the jquery code which will perform something after check and uncheck, you can add your custom function instead of alert.
<script type="text/javascript">
$("#singledate").click(function(){
$("#singledate").click(function(){
if($('input[name=singledate]').is(':checked') == true ){
alert("checked");
}
else
{
alert("unchecked");
}
});
</script>
Thats it, help this blog to grow, visit other cool code links! :)