Tuesday 18 July 2017

Uncaught ReferenceError: jQuery is not defined

Uncaught ReferenceError: jQuery is not defined
This is the most common JS error you got while using multiple jquery plugins in Joomla websie.
Following are main reasons for this error:
  • There is jQuery file being loaded in page.
    Check page source and confirm that jQuery is being loaded or not.
    Solution
    JHtml::_('jquery.framework');

    This will load the jQuery version 1.11.1 library in no conflict mode. This means it is accessed via the jQuery namespace, not through $.
  • There may be multiple jQuery files are being loaded in one page, and creating jQuery conflict.
    So, Make sure there will one jQuery loaded in one page.
    See Page source and remove extra loaded jQuery file(s).

No comments:

Post a Comment