-
AuthorPosts
-
September 29, 2014 at 7:06 am #326333
Hello
I’m testing WP4 and Enfold 2.9.2 against an existing site running older versions of both. We’re getting a JavaScript error on displaying a tooltip (caption) in a photo gallery. The problem is in the display_tooltip function of AviaTooltip:
text = element.data(this.options.data).trim(),
Uncaught TypeError: undefined is not a function avia.js?ver=2:1419
$.AviaTooltip.display_tooltip avia.js?ver=2:1419
m.isFunction.eWe’ve experienced this elsewhere – we have created a tooltip using your JS:
new $.AviaTooltip({"class": 'avia-siteswitch-tooltip',data: 'avia-siteswitch-tooltip', event:'click', position:'bottom', scope: "body", attach:'element'});
Which broke with the same error on upgrade. We had to change the structure of the markup declared in the data attribute data-avia-siteswitch-tooltip to make it work – but we couldn’t work out what had changed, we were kinda fixing in the dark.
Can you help? Be great to know what to do in both cases and also let us know if this is a bug, or whether we can’t rely on your UI classes to change going forward.
Thanks
September 30, 2014 at 5:02 am #326976Hi,
Can you post the link to the site please?
Regards,
JosueOctober 1, 2014 at 4:36 am #327833This reply has been marked as private.October 1, 2014 at 5:29 am #327844Hello,
Have you tried disabling all third-party plugins to see if it gets fixed?
Regards,
JosueOctober 1, 2014 at 6:38 am #327869Hello,
Yes. I’ve been through all the normal procedures.
As I said, I’m pretty certain it’s due to a change in the API of the Avia tooltip component.
Thanks
October 1, 2014 at 6:47 am #327872Hi!
I don’t think its been changed in a long time. Looking through the avia.js history I don’t see any notes about the tooltip getting updated in the past 6 months.
The undefined error sounds like a general js error. Typically its an issue with another plugin or an incomplete/broken javascript file.
If you download the 3.0 update that *just* went live on ThemeForest it has a fix I added to change the js version of avia to 3 which will clear any previous cache on the avia.js file. Or if you want to do that manually, first re-upload the whole js folder and then in your functions.php file find the avia.js being enqued and change the 2 to a 3 in that function.
wp_enqueue_script( 'avia-default', $template_url.'/js/avia.js', array('jquery'), 3, true );
That 3 will be a 2 on your version but its a 3 in version 3.
Best regards,
DevinOctober 1, 2014 at 10:29 pm #328538Hi
Yep, the latest version seems to have fixed it. All plug-ins reactivated and all working fine.
Thanks :)
-
AuthorPosts
- The topic ‘JavaScript Error After Upgrade – Avia Tooltip’ is closed to new replies.