Boolean variable in jquery, check if a check box is checked - Javascript jQuery

Javascript examples for jQuery:Variable

Description

Boolean variable in jquery, check if a check box is checked

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from  ww  w  .  ja  v a  2  s . c  o  m
$(".confirmCheckbox").change(function () {
    console.log(this.checked);
});
    });

      </script> 
   </head> 
   <body> 
      <input type="checkbox" id="confirmBox-${loopCounter.index}" class="confirmCheckbox">  
   </body>
</html>

Related Tutorials