Home › Forums › Weaver Xtreme Theme › TypeError: jQuery(“.wvrx_fixedtop”).wvrx_fixWvrxFixedTop is not a function
- This topic has 5 replies, 3 voices, and was last updated 2 years ago by
Weaver.
-
AuthorPosts
-
July 22, 2020 at 00:41 UTC - Views: 20 #64868
kdawson
ParticipantI get this JS error on each page of two sites using Weaver Xtreme v4.3.5, but not on a third site. See a screencap of the error at http://dawson.nu/misc/wvrx_fixWvrxFixedTop.png . jQuery version is 3.2.1 .
One of the sites is https://suddenlyathome.net/ .
Any clues appreciated.
July 22, 2020 at 01:26 UTC - Views: 24 #64869scrambler
Moderatoryou have a lot of script errors…
Possible culprits:
A version issue, so make sure you have the latest version of the Xtreme Theme, Xtreme theme support plugin and the Xtreme Plus plugin if you have it.
But it is most likely that the scripts are broken. This could happen if you have a plugin the Optimizes JavaScript and/or CSS. Xtreme already does the optimization, any optimization on top of that is likely to break things. Check your plugins, and if any does that or has an option that does that, disable it.
JavaScript could also happen if you have a script that loads its own version of JavaScript. WordPress loads it own, and you should not be loading anything else.
Last (least likely) you could have a corrupted theme /plugins, you may want to save your settings, download a copy, then switch to a different theme, then delete all weaver themes and plugins.
Then reinstall freshly downloaded version from WordPress (and your weaver account for Plus) and activate. All settings should be back.
July 22, 2020 at 02:51 UTC - Views: 24 #64870kdawson
ParticipantVersions: Xtreme Theme, All the same at 4.3.5. Xtreme theme support plugin, all the same at 4.0.5, No Xtreme Plus plugin.
Script optimizations: Among the plugins only Jetpack displays any options like that and they are turned off in all three sites.
JavaScript (here I assume you mean jQuery): This seems to be where the problem lies. For the two sites that report wvrx_fixWvrxFixedTop is not a function, I have loaded jquery-3.2.1-min.js at the bottom of the child theme’s footer.php. That load isn’t present in the site without the error.
I’ll have to figure out what to do about that. If I remove that script load the sites report: ‘$’ is not a function. So it sounds like jQuery is not in place at the time the footer needs it to be. Not the theme’s problem though.
Thanks for your help.
July 22, 2020 at 04:40 UTC - Views: 11 #64872scrambler
ModeratorYou need to remove the jquery js load so only the WordPress one is loaded, and replace $ by jQuery in your scripts.
Read the article below
https://guide.weavertheme.com/scripts-using-them-for-advanced-styling-or-design-changes/
July 22, 2020 at 11:44 UTC - Views: 9 #64874kdawson
ParticipantThank you! Now that’s service going above & beyond. I did as you suggest and everything works with no JS errors.
July 22, 2020 at 17:57 UTC - Views: 12 #64875Weaver
KeymasterJust FYI, it is a critical requirement of the WordPress core that the version of jQuery used is the one provided with the WP installation. The version they use changes from time to time (very infrequently). Unlike PHP or other programming libraries used by WordPress, the stability of jQuery is a bit finicky. Note: JavaScript != jQuery – one is the language used to write scripts (interpreted by your browser), while jQuery is a library of useful JavaScript functions.
It is possible to wrap almost any JavaScript with appropriate definitions to allow $ in place of jQuery, but it is always okay to use the longhand jQuery.
-
AuthorPosts
- You must be logged in to reply to this topic.