Hello,
I have to add a short script before closing body tag in “Settings” templates style.
The script works in browser console, but when it is inserted in “Settings” templates style I have a problem with double quotes.
Here is the script:
jQuery(document).ready(function() {
jQuery(".establishment-category:contains('Cinema')").removeClass("cat-kk-bg").addClass("cat-cinema-bg");
jQuery(".establishment-category:contains('Kino-Klub')").removeClass("cat-cinema-bg").addClass("cat-kk-bg");
});
If I insert double quotes at the same time with single quotes (as I usually do) the browser console gives me this error:
Uncaught SyntaxError: missing) after argument list
If I escape single quotes with backslash, like this:
jQuery(document).ready(function() {
jQuery('.establishment-category:contains(\'Cinema\')').removeClass("cat-kk-bg").addClass("cat-cinema-bg");
jQuery('.establishment-category:contains(\'Kino-Klub\')').removeClass("cat-cinema-bg").addClass("cat-kk-bg");
});
I have a blank page that is displayed in front-end
How to fix this?
Thanks for your help,
Lorenzo