I made a little Jquery script to modify the colors of the layout clicking a toggle button. If I change or reload the page I have to reclick the button.
Is it possible to keep the change and then return to the original colors only by clicking the button again(toggle)?
Here is the code
<button ID="btnToggleClass"><i class="fa fa-magic"></i></button>
$(document).ready(function() {
$('#btnToggleClass').click(function() {
$('body, #discover, header, footer .col-33, .wp-block-column, .card').toggleClass('backCol');
$('.sym-home-p, .post p, .nav-wrap a, .page p, .sym-services h3, .wpforms-container .wpforms-field-label-inline').toggleClass('whiteText');
$('.sym-h3, .nav-wrap span strong, .blog h2 a').toggleClass('black-sym-h3');
$('.wp-block-button__link').toggleClass('redButton');
$('.logo').toggleClass('logo-white');
$('.sym-cover-title-2, .sym-cover-title').toggleClass('titBlack');
$('h1, .comment-reply-title, .post h3, .wpforms-container .wpforms-field-label').toggleClass('titAzul');
$('aside h3, .post p a').toggleClass('redColor');
});
});