Using addJquery(), addJqueryPlugin() and addJqueryUI()
About Controller::addJquery()
When this method is called with a parameter, it includes the current version of jQuery, as available in the PrestaShop installation.
...
If the file is on your server, you can give its path as a second argument:
Code Block |
---|
MediaController::addJquery('1.3.1', '/local/path/to/jquery'); |
...
For instance, if you need to use jQuery's spiderslider:
Code Block |
---|
Contoller::addJqueryUIpublic function setMedia('ui.slider') { $this->addJquery(); } |
This code will automatically include the following dependencies:
...