Off screen element not working on click

The off screen element is no longer functioning on click. ANy idea how to fix?

Hello Chris,

Thanks for writing in!

The screen view button is not working because there is a JS error that prevented the button to work. All of these error is cause by your custom script added in Pro > Theme Options > Custom JS. You have added this line which you are not suppose to. To resolve this issue, please update that line and use this instead:

</script> <script src="https://www.google.com/recaptcha/api.js">

And since you have installed a caching plugin Breeze Cache, please clear your plugin cache and regenerate the minified JS/CSS files before testing your site. This can cause the changes to not take place on the front end. It will eventually show up when the cache regenerates, but it’s not ideal if you’re looking to see your changes immediately. Caching plugins are best to turn on only when you’ve finished building the site.

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Cheers.

Out of curiosity, why the “< / scrip t>” to begin with?

Hello Chris,

In the front end, the output of the custom JS, even if it is empty, is this:

<script id="cornerstone-custom-content-js" type="text/javascript"></script>

Now if you insert a custom JS like: <script src="https://www.google.com/recaptcha/api.js"></script>, on the front end it will become this:

<script id="cornerstone-custom-content-js" type="text/javascript"><script src="https://www.google.com/recaptcha/api.js"></script></script>

Now this will create a JS error because the script tag is nested which is definitely invalid. That is why we have to close the script tag first and then use the following suggestion above so that in the front end, you will have this:

<script id="cornerstone-custom-content-js" type="text/javascript"></script><script src="https://www.google.com/recaptcha/api.js"></script>

Basically, custom JS code should only be plain JS code with no script tag. My suggestion above is some sort of hack to prevent errors in you add a script tag in the custom JS section.

Hope this makes sense.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.