Joomla 3 - How to override jQuery with newer version?

Valentin Despa picture Valentin Despa · Sep 25, 2013 · Viewed 9.9k times · Source

In Joomla 3.x jQuery is coming by default with Joomla, but the version is a bit outdated (v.1.8.3) and I have a script that needs a newer version.

What can I do?

Answer

Valentin Despa picture Valentin Despa · Sep 25, 2013

In your template you can also override the jQuery file.

Like this:

JOOMLA_ROOT/templates/YOURTEMPLATE/js/jui/jquery.min.js

Where jquery.min.js is a newer version of jQuery.

That way Joomla will load your file and not the default version when using JHtml::_('jquery.framework');

Caution: Test well, so that you don't have other issues with the newer jQuery version.

Credits: Thanks Michael.