Jquery error (maybe?)

I’m not even really sure where to start with this, so hopefully you can help point me in a direction!

When I updated the theme, some of the functionality I had on a page with custom code broke (just some tooltips, nothing major, but I would like them back!). I thought some of my dependencies were outdated, so I tested my code locally, but everything was fine! So it is something with how it interacts with wordpress…

On the page - https://www.gaytascience.com/pride-calculator/ - I am getting the following console messages/errors:

  • JQMIGRATE: Migrate is installed, version 1.4.1
  • Uncaught TypeError: windowObj.scrollBottom is not a function

I found some threads suggesting that JQuery might be getting loaded in the wrong order or something? But don’t even really know where to start to fix that - or if it is a theme fix or if I need to write a workaround in my code… I know custom code is probably out of scope for support, but any thoughts would be much appreciated.

Thank you!

Hello There,

Thank you for the very detailed post information. I have checked your site and it seems that you are using a custom code or 3rd party script inserted in a raw content element. I would recommend that you remove this line from your code and test the page again:

<script src="https://code.jquery.com/jquery.js"></script>

Please take note that this line is not necessary since WordPress loads the jquery and having this line would create a conflict.

We would loved to know if this has work for you. Thank you.

Interesting, thank you! That does make the error go away! Removing also doesn’t break anything locally, so must’ve just been old code!

I’m still missing my tooltips on the site page though… I see the class being generated in the inspector though, just doesn’t display!? I am seeing a “Generated by Endurance Page Cache” comment in the inspector code as well, which I see online is a Bluehost thing that is really hard to remove… Do you think that might be causing the problem - is it worth going down the rabbit hole to remove it?

Thank you again!

Hello there,

I can’t see the Generated by Endurance Page Cache issue as well as the tooltips error. Can you give us steps as to where your seeing the error?

Thank you.

Sure thing!

When the bars in the chart are hovered over, a tooltip with a percentage number is supposed to appear above the bar. Even without the JQuery error anymore, they still do not appear when I view it (even though the code works locally). No error is thrown now, and when I inspect the page with the chrome inspector tools, I see that the div is there and changing - just for some reason does not display on the page! Above that element, I saw the Cache comment I mentioned, so I was curious if maybe I cannot see the changes because of this weird Bluehost plugin?

Here is a gif of what I am seeing, if that helps - https://drive.google.com/file/d/1_nig-MMLFzv4001xr1CcL8IIriwZFHo5/view?usp=sharing

Thank you!

Hi,

Try to clear endurance page cache and see if that fixes the issue.

Thanks

Issue ended up being in my code… https://github.com/Caged/d3-tip/issues/124 was helpful if anyone faces similar things

Thanks for sharing @campkels :slight_smile:

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