Issue
How can we find the default jQuery version used in Liferay?
Environment
- Liferay DXP 7.0+
Resolution
- The best way to check the jQuery version is by executing the bellow commands when the Liferay Portal is running:
- Executing in browser console
jQuery.fn.jquery
- Executing in browser console
$().jquery
- Executing in browser console
$.fn.jquery
- Checking the version from the source code:
Version File 7.0 frontend-js-web/build.gradle 7.1 frontend-js-web/package.json 7.2, 7.3, 7.4 frontend-js-jquery-web/package.json -
Note:
- Starting with Liferay 7.3, jQuery is not active by default. It is necessary to enable it in System Settings > Third Party > JQuery > Enable JQuery.
-
The jQuery version may differ from one fix pack to another. For example, if the above query is executed in the browser console when Liferay 7.1 is running, the below results are shown.
1) Liferay DXP 7.1 with no fix pack has jQuery version: 3.3.1
2) Liferay DXP 7.1 with fix pack dxp-14 has jQuery version: 3.4.0