Login Form

Login or register to buy licenses or to access software previously purchased.

If you are experiencing login issues, please contact us!

Remember Me
Register
Facebook Login Google Login Twitter Login
Thu29Oct2015

Solve jQuery/jQuery and jQuery/MooTools conflict issues with the jQuery Easy plugin

jQuery Easy jQuery Easy Profiles

First published April 10, 2012

Over the past few months, a large number of users have asked my help in finding out what was wrong with their website, even after installing the jQuery Easy plugin.

In this article, I will try and address ways of fixing these issues, with the help of the plugin.

What the plugin IS NOT:

  • a miracle solution that fixes all your issues with magic
  • a harmfull extension that erases code irreversibly

What the plugin IS:

  • a way of properly adding jQuery and jQuery UI libraries to the front and back ends of your website and prevent conflicts with the MooTools libraries
  • a solution that removes unnecessary multiple occurences of the jQuery libraries

Warning: if you are foreign to what jQuery is (and MooTools for that matter), the following explanations probably won't make any sense to you. There are a multitude of articles online that can help you find out what these libraries are. I strongly suggest you educate yourself on the matter if you want to go any further... And maybe you need a professional eye to look into your website issues.

If you want to try jQuery for yourself, the jQuery Easy plugin is the perfect tool to install the needed libraries. Use a third-party extension to include javascript code into your site. Such extensions can be found on this site (in the template companions download section).

Removing jQuery compatibility issues

Step 1 - Identify which extensions require the jQuery library to work

Step 2 - For each extension found at Step 1, find out what version of the jQuery library they use

Clues on how to find out the version:

  • the included libraries look like jquery-1.3.2
  • the extension calls a specific online version identified in the <head> tag of your website
  • the extension gives you the choices on jQuery in its parameters

When all that fails, check on the extension's website and/or documentation.<br/ > The last resort is to contact the developer himself.

Step 3 - The extension with the higher library version will be the version of reference. Set the version of the jQuery library in the jQuery Easy plugin to that version number (for instance, if the highest version number you have found is 1.6.3, use 'jQuery v1.6 (latest)' from the jQuery version field. 

Step 4 - Test each extension found in Step 1 that has a smaller version number than the one of reference to make sure it still works under that version (may have compatibility issues)
How to do this:

  • check if there is an update to your extension already with an updated jQuery library version
  • ask the developer if he can ensure his extension is compatible with your version of the jQuery library
  • isolate the extension and try it out with the new version (for instance, on a separate template, use jQuery Easy plugin and only that extension)

Only then you can be ensured that all your extensions are going to work with your version of reference.

Note: check if there is an option to disable jQuery in your extensions. If so, disable jQuery from them (once again, make sure the extensions still work with the jQuery easy version selected)

But wait, I still have issues. How come?

jQuery Easy cleans up the jQuery libraries but modifications may need to be done over script declarations.
Remaining code can still be in conflict, either with other jQuery code or MooTools code.

You will need to inspect every javascript file and every script declaration that shows up in the <head> section of your website.

If you find code like this:

$(document).ready(function(){
     $("div").hide(); // picked up by jQuery and MooTools
});

replace it with:

jQuery(document).ready(function($){
     $("div").hide(); // picked up by jQuery only
});

or

jQuery(document).ready(function(){
     jQuery("div").hide(); // picked up by jQuery only
});

Acceptable javascript code

var $j = jQuery.noConflict(); // Use jQuery via $j(...)
     $j(document).ready(function(){
     $j("div").hide();
});
var $k = jQuery.noConflict(); // Use jQuery via $k(...)
     $k(document).ready(function($){
     $("div").hide();
});
jQuery.noConflict()(function(){ /* code using jQuery */ });
(function($) { /* some code that uses $ */ })(jQuery)

Other potential issues

Problem: you have a version of the jQuery library hidden by the extension's or template's maker.

For instance, /cache/template/gzip.php?jquery-f8baf168.js is actually a jQuery library, but it has not been detected by jQuery Easy because of it's inconventional naming.

Solution: add the path to the Strip remaining scripts field in the plugin.

Problem: some jQuery UI CSS has been added by an extension with a different naming convention.

For instance, you spotted www.figster.co.za/media/sobipro/css/jque...hness/smoothness.css in the code source of your website.

Solution: add the path to the Strip remaining CSS field. Select the jQuery UI theme needed for that extension (here: smoothness) in the plugin.

Latest News

  • 23 Nov

    Weblink Logos

    v2.1.0 - Update release. Safer and easier caching system. Download here...
  • 23 Nov

    Weblink Logos Pro

    v2.1.0 - Update release. Safer and easier caching system. More info here...
  • 19 Nov

    Trombinoscope Contacts

    v2.5.0 - Update release. Safer and trouble-free caching. User stylesheets. Download here...
  • 19 Nov

    Trombinoscope Contacts Pro

    v2.5.0 - Update release. Safer and trouble-free caching. User stylesheets. More info here...
  • 14 Nov

    Truly Responsive Slides

    v1.5.1 - Update release.  Download here...
  • 14 Nov

    Truly Responsive Slides Pro

    v1.5.1 - Update release. More info here...
  • 07 Nov

    Article Details

    v4.0.0 - Update release. Most user-friendly version ever. Download here...
  • 03 Nov

    Latest News Enhanced

    v2.5.0 - Update release. Caching rewrite, improved rating system. Download here...
  • 02 Nov

    Newsfeeds for Latest News Enhanced Pro

    v1.0.7 - Update release for use with Latest News Enhanced Pro v2.5.0. Download here...
  • 02 Nov

    Latest News Enhanced Pro

    v2.5.0 - Update release. Cache rewrite, user friendly additions and external library auto-install. More info here...