Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I'd like to know if there is a way to add a Javascript file into a theme, which would be loaded on each sheet, like the CSS file is.
The goal would be to analyse the DOM to add custom classes to the object-wrappers based on specific rules, so we can use it as a selector when it's not "natively" possible.
For exemple, automatically remove the background color of a button if a background image has been set. We cannot do this using CSS selector, because the only thing changed in the DOM is an inline style on the button object, so using Javascript we could check if there is the background-image property on the element, and add a class on the object-wrapper so our CSS could apply.
Regards
check once below link
Hi.
Maybe I'm missing something, but I cannot find anything related to adding a Javscript file to my theme.
Regards