Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review
Information
Print

jQuery options

Information
jQuery Easy

Warning There will be no conflict resolution until jQuery is enabled.

Enabling jQuery will trigger several actions. By default (before enabling/modifying advanced options), the plugin will:

  • look for library duplicates (jQuery, Migrate, jQuery UI or jQuery Mobile) in <script> tags,
  • look for stylesheet duplicates (for jQuery UI and jQuery Mobile) in <link> tags,
  • look for no conflict scripts and declarations,
  • delete those scripts, stylesheets and declarations,
  • replace the deleted libraries with the ones that you have selected,
  • add a single no conflict code script,
  • put all scripts in the correct order, alongside all other scripts of the treated page.
Add/Fix jQuery
No selection use the plugin without adding jQuery libraries, removing duplicate libraries or resolving jQuery conflicts
There will be no resolution until one of the following options is selected
jQuery jQuery
replace the jQuery library and scan for jQuery issues
jQuery + jQuery UI jQuery + UI
replace jQuery and jQuery UI libraries and scan for jQuery and jQuery UI issues
jQuery + jQuery Mobile removed in J! 4 Profiles jQuery + Mobile
replace jQuery and jQuery Mobile libraries and scan for jQuery and jQuery Mobile issues

Note if jQuery UI or jQuery Mobile are not already located in the code source of your page, then you probably do not need it.

jQuery jQuery

(Learn about jQuery)
Version
  • X load the library version X from the Content Delivery Network (CDN)
  • local use a specific file added by you on the server
  • Joomla! 3 Joomla! framework use the library packaged with Joomla (local)
Note jQuery v2+ does not support Internet Explorer 6, 7 and 8. Use only if you are certain you do not need support for these browser versions.
Profiles slim versions are available.
Sub-version When using versions 1.9 and over, the Google CDN asks us to specify which release of that milestone is actually requested.
Prior to v1.9, the latest release of each milestone is used by default. But one can still specify a sub-version.

Example 2 where 2 is the last number in 1.9.2 when selecting version 1.9.x

Local path The path to the local file when using the local version option.

Example /libraries/jquery/v1.7/jquery.min.js

Migrate version Use in conjunction with jQuery libraries v1.9 and over. It garanties older scripts created for jQuery remain compatible with the latest versions of the library.
  • 3.0.x load the Migrate script version 3.0 from the jQuery CDN (the sub-version x is required)
  • 1.2.1 1.4.1 load the Migrate script version from the jQuery CDN
  • local use a specific file added by you on the server
  • Joomla! 3 Joomla! framework use the script packaged with Joomla
Note Do not use Migrate when using jQuery prior to v1.9.
Sub-version Starting version 3.0, you need to specify the Migrate sub-version (x)

Example 1 where 1 is the last number in 3.0.1

Migrate local path The local path to the jQuery Migrate plugin

Example /libraries/jquery/jquery-migrate-1.2.1.js

jQuery User Interface jQuery UI

(Learn about jQuery User Interface)
Version
  • X load the UI library version X from the Content Delivery Network (CDN)
  • custom/local use a specific file added by you on the server
  • Joomla! 3 Joomla! framework use the UI library packaged with Joomla (local)
Sub-version When using versions 1.9 and over, the Google CDN asks us to specify which release of that milestone is actually requested.
Prior to v1.9, the latest release of each milestone is used by default. But one can still specify a sub-version.

Example 2 where 2 is the last number in 1.9.2 when selecting version 1.9.x

Custom/Local path The path to the local or custom file when using the custom/local option.
The jQuery UI file can be the full-blown UI library or a custom one created at the jQuery UI website.

Example /libraries/jquery-ui/v1.8/jquery-ui-custom.min.js

Theme Set the UI theme (or skin) that will be used in conjunction with the jQuery UI library. Themes are not always required. Note You can find skins at the UI ThemeRoller website, gallery tab.
Note The Joomla! framework does not package a theme for jQuery UI (the library has been customized and does not require skins). Therefore, do not load a theme when using the jQuery UI library packaged with Joomla.
Warning Since jQuery UI v1.10.2, the base theme is not available anymore. Use another skin or you will end up with errors on the page. It has been re-introduced in jQuery UI v1.12.0.
Custom/local theme path The path to the custom or local CSS file.
Get or customize skins at the ThemeRoller UI ThemeRoller website.
Note Images are usually associated with a skin. Wherever the path of your file is, add a images/ folder containing those images.

Example /libraries/jquery-ui/v1.8/jquery-ui.css

removed in J! 4 Profiles

jQuery Mobile jQuery Mobile

(Learn about jQuery Mobile)
Version
  • X load the library version X from the Content Delivery Network (CDN)
  • local use a specific file added by you on the server
Note jQuery Mobile is compatible with jQuery v1.8 and over
Local javascript path When using the local option, set the path to the local javascript (.js) file

Example /media/jquerymobile/v1.4/jquery.mobile-1.4.0.min.js

Local stylesheet path When using the local option, set the path to the local stylesheet (.css) file

Example /media/jquerymobile/v1.4/jquery.mobile-1.4.0.min.css

Theme Set the mobile theme that will be used in conjunction with jQuery Mobile.
  • default select if the local stylesheet already contains the skin
  • custom use file(s) added by you on the server
Custom theme path(s) The path to the custom skin stylesheet(s). Customize skins at the ThemeRoller Mobile ThemeRoller website.

Example /media/jquerymobile/themes/my-custom-theme.css

Additional modifications (dependent)

The following settings work in conjunction with the Add/Fix jQuery value. They will have no effect if the Add/Fix jQuery value is set to No.

removed in J! 4
Replace when unique
Replaces the jQuery/jQuery UI libraries and/or jQuery UI CSS with the plugin’s choices even when there is only one instance of those present on the page.
New v4+ Profiles the same rule applies to jQuery Mobile
removed in J! 4
Add when missing
Adds the jQuery library to pages that do not have jQuery in them
Ignore scripts Makes sure the scripts listed remain on the page and are not stripped out by the plugin (some file names are built in such a way they can be mistaken for a jQuery library). One script per line.
Note Joomla 3 The script file media/jui/js/chosen.jquery.min.js is added by default because it is commonly used.

Example /js/wanted_script.min.jquery.js

Strip no conflict code Removes all no conflict scripts and declarations by default.
Will get rid, for instance, of jQuery.noConflict(), $.noconflict(), jQuery.noConflict(false)$.noConflict(true)var j = $.noConflict(true)

Warning When a variable declaration is removed, it may be necessary to re-inject it in the code (go to the scripts tab). For instance, var j = $.noConflict(true) should be re-introduced as var j = jQuery.noConflict(true).

New v4+ You now have the option to skip the removal of the noConflict declarations that have a variable attached to them. When ignored, it still replaces $ with jQuery

Warning The regular expression that is used to remove code like var j = $.noConflict(true) can timeout on large pages, especially when images are encrypted and embedded in the source code.

Joomla 4 When removing the noConflict script declarations, it will keep variable-assigned declarations
Add no conflict code
  • No Mostly used when jQuery is the only library loaded on the page.
  • Thru script declaration Adds jQuery.noConflict(); as visible script in <head>.
  • Thru script Default Adds the jquerynoconflict.js script file right after the jQuery script file. It ensures the jQuery scripts use jQuery rather than $, no matter if another library that could conflict with it is loaded before or after jQuery.

Joomla 4 Only adds the script alongside jQuery
Fix document ready Replaces all occurrences of $(document).ready(function() or $(document).ready(function($) with jQuery(document).ready(function($).
Using jQuery in the statement is required when using no conflict
New Profiles
Defer jQuery
Add the defer attribute to all jQuery-related scripts (jQuery, Migrate, jQuery UI ...) at once

Additional modifications (independent)

The following settings are independent from the Add/Fix jQuery option.

Caption
removed in J! 4
Disable Captions
Gets rid of JCaption.
Profiles v4+ The option Yes, by overload overloads the core Joomla calls for captions by returning nothing whenever captions are called site wide. It prevents lookups by regular expressions, making the process faster.
Note Since Joomla! 3.2, the caption script is a jQuery script.
Chosen
Profiles
Disable Chosen
Gets rid of the Chosen plugin.
The option Yes, by overload replaces the core Joomla call to Chosen with nothing whenever Chosen is called (the scripts and styles will be removed site-wide). It's an alternative to using regular expressions, making the process faster.

Important information

Using sub-versions is useful for caching the library files for a year and therefore optimizes website loading times. Find more information at the BucketSoft blog.

The plugin will sometimes remove the wrong scripts when looking for jQuery libraries. For instance:

  • …searchtools.jquery.min.js will be removed, wrongly identified as a jQuery library,
  • …jquery.searchtools.min.js will not be removed, rightly assuming this is a jQuery plugin.

When a library has been wrongly deleted (easily identified if you are using the reporting tool or comparing the source code before and after enabling the plugin), use the Ignore scripts option to force the plugin to ignore the script in its search for jQuery libraries.