Using jQuery and jQueryUI
When this method is called with a parameter, it includes the current version of jQuery, as available in the PrestaShop installation.
For instance, this method can be called from the
setMedia() method in the
If you wish to use a newer or older version of jQuery, you just have to pass the version number as first parameter:
If the file is not available on your server, PrestaShop will try downloading it from the Google servers.
Including a version of jQuery that differs from PrestaShop's default one, means that the
noConflict flag is automatically called, so that both version can work seamlessly.
Making noConflict work
Version 1.3.1 of jQuery is not available through
$, but rather using the
Hence, you can call
If you wish to use 1.3.1's
$, you simply have to use this:
If the file is on your server, you can give its path as a second argument:
For instance, if you need to use jQuery's slider:
This code will automatically include the following dependencies:
/js/jquery/plugin folder, or in the folder passed as second parameter.
If you wish to add a specific jQuery plugin to PrestaShop, you must follow this process: