1

Hello I have an old Joomla 2.5 site. I use the jQueryEasy for optimization and if I dont I get some random mootools error.

My issue is : I want to use the draggable() method of jQuery UI. It seems that the jQueryEasy doesnt load the correct jQuery UI ( the one with the other libraries like draggable ).

What I tried:

Inside a component's view I tried to load the cdns from jQuery and jQuery UI.

<script src="/js/jquery-1.12.4.js"></script>
<script src="/js/jquery-ui-1.12.0.js"></script>
<div id="test">
   TEST TEST TEST
</div>
<script>
jQuery(function() {
    jQuery("#test").draggable();
});
</script>

No errors , just not working.

Load the same version of jQuery + UI from the jQueryEasy plugin.

Same story. No errors , and didnt work.

Created a new file in joomla root folder ( wanted to test a file outside of Joomla Environment )

This worked perfectly. So I reached to the conclusion that the issue here is the jQueryEasy plugin.

Stopped the plugin and tested the 1st step

Worked again.

I cant unpublish the plugin, so is there any other way to load the correct jQuery UI and get my hands on draggable() method ?

  • not an answer, but you might give a shot to toomanyfiles, another plugin that enabled jQuery, it has a thorough configuration to choose the cdn / local versions of libraries. It's worth a shot. – Riccardo Zorn Aug 10 '16 at 7:07
1

I got it.

jQueryEasy has a feature to ignore some scripts for getting stripped.

enter image description here

I removed the initialise of jQuery UI, I loaded it manually from template and excluded from plugin and everything worked like a charm

  • So you're going to load jQuery UI on every single page even though you may not need it? Not the best idea...it's a big library – Lodder Nov 8 '16 at 13:01
  • @Lodder With the "template" I meant the view I need it. No Need to add it on main template – IseNgaRt Jan 9 '17 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.