Skip to content

Instantly share code, notes, and snippets.

@New0
Last active January 26, 2018 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/4dde42474a387eca6bb71740ecc67d04 to your computer and use it in GitHub Desktop.
Save New0/4dde42474a387eca6bb71740ecc67d04 to your computer and use it in GitHub Desktop.
Add and remove a class to .caldera-grid .CF5a5fc16500e92 .checkbox Label on click event using jQury in the footer
<?php
/*
* Plugin Name: CF custom code
*/
add_action( 'wp_footer', function() {
echo '<script>
jQuery( ".caldera-grid .CF5a5fc16500e92 .checkbox Label" ).click(function() {
$( this ).toggleClass( "checked" );
});
</script>';
}, 10 );
.caldera-grid .CF5a5fc16500e92 .checkbox Label.checked {
background-color: #a8bcc6;
border-color: #6e267b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment