Forum Replies Created
-
AuthorPosts
-
November 17, 2020 at 1:48 am in reply to: Language Switcher JavaScript stopped working after Enfold update #1260867
Hi,
Thanks a lot, I’m fine. I think we can close this topic.
Thanks again and all the best,
ChristianNovember 17, 2020 at 1:13 am in reply to: Language Switcher JavaScript stopped working after Enfold update #1260860Dear Mike,
Thanks a lot for the information. That’s very helpful. I placed the code in the functions.php file and now everything works properly. Clearly, if the Google Analytics area would work out, this would be preferable, because changes in the functions.php file have to be restored manually after an update whereas changes in the Google Analytics area are kept also across updates. But that everything works now again is already really very helpful. Thanks again — very much appreciated.
All the best and take care,
ChristianNovember 12, 2020 at 12:37 pm in reply to: Language Switcher JavaScript stopped working after Enfold update #1260099This reply has been marked as private.November 10, 2020 at 7:44 am in reply to: Language Switcher JavaScript stopped working after Enfold update #1259493Dear Mike,
Thanks a lot for your feedback and the information. Indeed, the language switcher is an extra-script that sets a cookie-value depending on which language-icon of the website was pressed. And then, the script in enfold’s “Google Analytics Tracking Code” area checks out whether “de” or “en” is set as cookie value and hides the respective content in the alternative language.
I’ve tried out your script and it still does not work. I think the problem is that the ready-function is not triggered.
To check, I tried out, e.g.:
<script> jQuery(document).ready(function(){ alert("Ready!"); }); </script>
which did not work; as an alternative, I tried out:
<script> window.addEventListener('load', function () { alert("Ready!"); }); </script>
which also did not work. Is there any possibility to trigger the ready-function (or the eventListener “load”)?
Thanks again and all the best,
Christian -
AuthorPosts