Styling a checkbox using jQuery

I am am trying to have a form that has some checkboxes to select several services. I’m trying to add style the checkboxes when they are checked (add a background color and change the color of the label and icon from black to white) but the jQuery code that I implemented isn’t cutting it. This is what I have so far:

$('.checkbox-wrapper').on('click', function() {
    if (!$(this).find('.checkbox-button').is(':checked') {
    else {

This post got me pretty far, but I can’t seem to figure out the rest.

Here is my site Read-Only: Webflow - AVOX Studios LLC

I found a solution using ‘change’ instead of ‘click’ and toggleClass instead of addClass. Here is the code that worked for me:

$('.checkbox-wrapper').on('change', function() {

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.