I have a variable where I have stored my checkbox id's but while I am trying to check if the checkbox is selected or not, it's not working fine.
<script>
function check(){
var id = "checkbox1.0";
if($('#' + id).is(':checked')){alert("checked");}
}
</script>
<body>
<input type ="checkbox" id = "checkbox1.0">
<input type ="checkbox" id = "checkbox2.0" onclick="check()">
</body>