You will often need a newer version of jQuery to use a certain jQuery plugin. There are two ways to achieve this.
<?php
/**
* @file
* Provides information about external libraries.
*/
/**
* Class theme_library.
*/
class theme_library
{
/**
* Provides information about external libraries.
*/
function config()
{
return array();
}
/**
* Alters library information before detection and caching takes place.
*/
function config_alter(&$libraries)
{
// Override CDN library path. Make sure, CDN path is correct.
$libraries['cdn.jquery']['path'] = '3.1.1';
// Override local library path. Make sure, you have downloaded the files
// to 'e107_web/lib/jquery/3.1.1' folder with the same folder structure
// than 'e107_web/lib/jquery/2.2.4'.
$libraries['jquery']['path'] = '3.1.1';
}
}
<?php
/**
* @file
* Provides information about external libraries.
*/
/**
* Class PLUGIN_NAME_library.
*/
class PLUGIN_NAME_library
{
/**
* Provides information about external libraries.
*/
function config()
{
return array();
}
/**
* Alters library information before detection and caching takes place.
*/
function config_alter(&$libraries)
{
// Override CDN library path. Make sure, CDN path is correct.
$libraries['cdn.jquery']['path'] = '3.1.1';
// Override local library path. Make sure, you have downloaded the files
// to 'e107_web/lib/jquery/3.1.1' folder with the same folder structure
// than 'e107_web/lib/jquery/2.2.4'.
$libraries['jquery']['path'] = '3.1.1';
}
}
Finally, visit Admin UI / Preferences / Libraries page, and check your jQuery libraries.
What would happen if 2 different plugins request conflicting libraries? eg. 2 different versions of jquery