ClarusDignus

On click, add class until checkbox/label clicked off

Jan 19th, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.39 KB | None | 0 0
  1. //http://stackoverflow.com/a/34888846/2971649
  2. //You can add the below code the this JSFiddle: http://jsfiddle.net/k9mgh8rz/4/
  3.  
  4. $('input[type=checkbox]').on('click change', function(){
  5.      alert('Checkbox click or change');
  6.      //if not checked
  7.      //$('.icheckbox_minimal').css('background-position', '-30px 0');
  8.      //if checked
  9.      //$('.icheckbox_minimal').css('background-position', '-90px 0');
  10.    });
Advertisement
Add Comment
Please, Sign In to add comment