yuvarajupadhyaya

Dynamic button event

Apr 6th, 2022
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    $('body').on('click', ' #StudentOptionModal #select_all', function () {
  2.         if (this.checked) {
  3.             // Iterate each checkbox
  4.             $('.checkbox').each(function () {
  5.                 this.checked = true;
  6.             });
  7.         } else {
  8.             $('.checkbox').each(function () {
  9.                 this.checked = false;
  10.             });
  11.         }
  12.     })
Advertisement
Add Comment
Please, Sign In to add comment