JavaScript not being indexed
Hello. I am having issues with the theme not applying my JavaScript code. Upon testing it in the console on the corresponding page, it works perfectly. Upon applying it in Theme Options > Custom JS, it seems to not even index it.
Please advise further on how should this be resolved. Regards, Ioan
Please advise further on how should this be resolved. Regards, Ioan
Comments
dollarSing[i].style.display = "none";
}
var dollarTwo = document.querySelectorAll('.price>span');
for(i = 0; i< dollarTwo.length; i++){
dollarTwo[i].style.display = "none";
}
var couponBox = document.querySelector('.reo-coupon-box');
var formSubmit = document.querySelector('.submit-opts-form');
couponBox.appendChild(formSubmit);
As you can see, it is perfectly valid JavaScript and DOM manipulation.
Upon pasting this code in the console, it works perfectly. The moment it is applied in Custom JS, it is as it was never written. You can see for yourselves on this page: https://thewebprestige.com/reach-us/
If needed I will cooperate further, but has to be resolved in one way or another.
The problem is that you have erros in your code: https://pasteboard.co/GXefT2b.png