Jquery functions not executed
-
Hello,
I’m having a problem with a website: https://itjobsco.com/
If you scroll down a bit you would see “Latest Jobs”, “Latest Resumes” and “Latest Companies” tabs. The problem is, the content of all tabs is shown.
To compare: the template preview is here: https://alexgurghis.com/themes/wpjobus/
The JavaScript and CSS is completely unchanged, as well as classes and ids of the divs.
On localhost, it works fine, also I compared the code and it’s all same (JavaScript and CSS).
What I did yesterday, was trying to render-block JavaScript (PageSpeed results are weak for this site and for template even more). I tried a bunch of plugins but all on localhost and since none of them helped (after every plugin absolutely none JavaScript loaded on the site) I did not install any of them in the published site.
Finally, following a tutorial, I put a class in functions.php and made a custom handler to add async to wanted scripts.
Everything was fine, but at the end of the day, when I logged out of wordpress, no JavaScript loaded. That’s the first weird thing since what difference does it make if I’m logged in or not. So I undid all changes to functions.php in both localhost and published site.
I also wrote async to a couple of scripts in header.php but also reverted.
I really don’t know where to look. It is really weird that only those tabs are affected. Even on localhost I can see as it is loading to be the way as it is in the published site, but then at the end the content of the other two tabs disappears, but in the published site those functions (.hide() to hide the tabs content and .show() to show the first tab’s content) just don’t execute. As I looked for solutions I wondered if it might be multiple jQuery instances somewhere but in that case why other JavaScript on the page isn’t affected.
As I said, it shouldn’t be plugins because on the published site, I did not install any.
Any suggestions would be appreciated.
Thanks
- The topic ‘Jquery functions not executed’ is closed to new replies.