Keyword

AllVideos Javascript conflit with Headroom Gantry 5 Atom

  • NIccolò Angeli
  • NIccolò Angeli's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 10 months ago #168098 by NIccolò Angeli
Replied by NIccolò Angeli on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
Hi Krikor,
I contacted again Ivo from InspireTheme and here is his reply:

We've seen JS conflicts when AllVideos is being used many times before.
We've seen those conflicts with templates and extensions from many different providers and developers. We are not talking about our templates here.
In all that cases, AllVideos was causing the conflict.
We cannot tell for sure what in AllVideos is causing the issue. Is it the use of "MooTools" or is it something else...

Regarding our anonymous function that loads the script - we use a "self invoking anonymous function":

(function($) {
// Code goes here
})(jQuery);

Regarding the use of .load() instead of .ready() - we do it like that on purpose, on a very good purpose.

As you know, the code within .ready() is executed as soon as the document is ready (without the images).
While we need to wait until everything is fully loaded as we need to get a proper .height() of the element.
Moreover, what the guys at AllVideos are saying does not make much sense because .load() waits more compared to .ready(), it waits until everything's fully loaded.

Yes, we do know that .load() is removed from jQuery v3, but Joomla 3 ships with jQuery v1.12.x so this is out of the conversation.

And finally, what our "Headroom.js" atom does is to simply load the Headroom assets and provide the configuration values.
If the guys at AllVideos are interested, they might want to have a look at the Headroom.js repo on Github: github.com/WickyNilliams/headroom.js/

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 10 months ago #168152 by Krikor Boghossian
Replied by Krikor Boghossian on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
Can you try commenting out these lines?
github.com/joomlaworks/allvideos/blob/master/plugin/jw_allvideos.php#L142-L146
You can see the path of the file is plugins/content/jw_allvideos/jw_allvideos.php

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • NIccolò Angeli
  • NIccolò Angeli's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 10 months ago #168160 by NIccolò Angeli
Replied by NIccolò Angeli on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
Done, but it doesn't solve the issue.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 10 months ago #168169 by Krikor Boghossian
Replied by Krikor Boghossian on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
This means that AllVideos is not loading MooTools.
However I can still the library present.
I am sorry but since there are no JS errors and the extension in question was not developed by us, I cannot debug their code.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • NIccolò Angeli
  • NIccolò Angeli's Avatar Topic Author
  • Offline
  • Junior Member
More
5 years 10 months ago #168176 by NIccolò Angeli
Replied by NIccolò Angeli on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
I understand. I suggest you look into this on your side by installing the headroom atom on a gantry5 template. It's a pretty popular addon for Gantry, and AllVideos is definitely cinvolved in the conflict, if I disable it everything works fine.

Thank you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 10 months ago #168226 by Krikor Boghossian
Replied by Krikor Boghossian on topic AllVideos Javascript conflit with Headroom Gantry 5 Atom
The only solution I can recommend is using jQuery's no conflict mode and removing the dollar sign in Headroom's initialisation script.
api.jquery.com/jquery.noconflict/

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum