What is the default jquery version used in Liferay?

Issue

How can we find the default jquery version used in Liferay?

Environment

  • Liferay DXP 7.3
  • Liferay DXP 7.2
  • Liferay DXP 7.1

Resolution

  • The best way to check the jquery version is by executing the below 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 frontend-js-jquery-web/package.json
    7.3 frontend-js-jquery-web/package.json
  • Note:
    • In 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
这篇文章有帮助吗?
3 人中有 3 人觉得有帮助