Try this…
$(":checkbox").on('click', function(){
$(this).parent().toggleClass("checked");
});
Greetings.
More Related Contents:
- Changing the child element’s CSS when the parent is hovered
- jQuery Adding new option to select element doesn't pick up the string [closed]
- Slide down button to show text HTML CSS
- jQuery if checkbox is checked
- Bootstrap 3 Collapse show state with Chevron icon
- Add and remove a class on click using jQuery?
- css width: calc(100% -100px); alternative using jquery
- Number nested ordered lists in HTML
- Use jQuery/CSS to find the tallest of all elements [duplicate]
- How do I auto-hide placeholder text upon focus using css or jquery?
- Set width of a “Position: fixed” div relative to parent div
- How to make a hover effect for pseudo elements?
- Exporting PDF with jspdf not rendering CSS
- How to take id as selector when used hash?
- Get height of div with no height set in css
- Mobile site – force landscape only / no auto-rotate
- calculate the number of html checkbox checked using jquery
- Check, using jQuery, if an element is ‘display:none’ or block on click
- How can I tell if a particular CSS property is inherited with jQuery?
- Change button text jquery mobile
- How to handle change of checkbox using jQuery?
- Can an iframe only show a certain part of the page?
- CSS issue on Twitter Typeahead with Bootstrap 3
- How to keep footer at the bottom even with dynamic height website
- Google Chrome viewport-anchored expand direction with flexbox
- JQuery search in static HTML page with highlighting of found word
- The .fadeOut() method to use visibility property instead of display property
- Bootstrap Carousel showing next and previous image
- Possible to have a floating horizontal scrollbar?
- addClass and removeClass in jQuery – not removing class