Answers.Body: <p>Try enclosing your jquery code in:</p>
  
  <pre><code>CRM.$(function($) {
  $(document).ready(function () {
  
  });
  });
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-01-04T18:13:32.687Z
Answers.LastActivityDate: 2018-01-04T18:13:32.687Z
Answers.UserDisplayName: Hassan Farooq
Body: <p>After upgrading to CiviCRM 4.7, several CiviCRM related pages/functions on my site are not working and reporting errors related to CRM.$ not being defined as a function, but I can't find where it should be originally defined. Jquery appears to be loading and working okay. Also, when I access the 'CiviCRM » Administer CiviCRM » System Settings » Directories' page, only the core menu is displayed without any css formatting. None of the directories options are displayed so I can't verify/change them. Three, ReferenceError: CRM is not defined errors are reported for the page.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-04-06T14:35:26.857Z
Comments.Text: Found a work-around for the Directories page not displaying. Hack the  administrator/components/com_civicrm/civicrm/templates/CRM/Admin/Form/Setting/Pa‌​th.hlp to replace crmResPath with crmResURL.
Comments.UserDisplayName: CSDweb
Tags: <civievent><upgrade><4.7><javascript>
Title: After CiviCRM 4.7 upgrade, CRM.$ Not A Function Errors
ThreadText: # After CiviCRM 4.7 upgrade, CRM.$ Not A Function Errors
  
  (Asked by: username_0 on 2016-04-06)
  
  After upgrading to CiviCRM 4.7, several CiviCRM related pages/functions on my site are not working and reporting errors related to CRM.$ not being defined as a function, but I can't find where it should be originally defined. Jquery appears to be loading and working okay. Also, when I access the 'CiviCRM » Administer CiviCRM » System Settings » Directories' page, only the core menu is displayed without any css formatting. None of the directories options are displayed so I can't verify/change them. Three, ReferenceError: CRM is not defined errors are reported for the page.
  
  **Tags:** civievent, upgrade, 4.7, javascript
  
  > **Comments:**
  > **username_0**: Found a work-around for the Directories page not displaying. Hack the  administrator/components/com_civicrm/civicrm/templates/CRM/Admin/Form/Setting/Pa‌​th.hlp to replace crmResPath with crmResURL.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-01-04. Score: 1
  
  Try enclosing your jquery code in:
  
  ```
  CRM.$(function($) {
  $(document).ready(function () {
  
  });
  });
  
  ```
  
  
  ---
  
  