Handle change of checkbox using jQuery using CLASS - Javascript jQuery

Javascript examples for jQuery:Form Checkbox

Description

Handle change of checkbox using jQuery using CLASS

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">

      </script> 
      <script>
$(document).ready(function(){
  $(".mm").on("change",function(){
    console.log(this.value);
  });/*from w ww.j  a v a 2  s . co  m*/
});

      </script> 
   </head> 
   <body> 
      <input type="checkbox" class="mm" value="1"> 
      <input type="checkbox" class="mm" value="1"> 
      <input type="checkbox" class="mm" value="1">  
   </body>
</html>

Related Tutorials