title: Joomla jQuery is not defined
body: <p>on my website http: //******.com/, when I upgrade to php 7 it gives me the error of Uncaught ReferenceError: jQuery is not defined when it is defined at the beginning of my index.php</p>
  
  <p>The strange thing is that with version 5 of php everything is correct. What can be the failure?</p>
  
  <pre><code>$jquery = '';
  jimport('joomla.version');
  $version = new JVersion();
  if(version_compare($version-&gt;getShortVersion(), '3.0', '&gt;=')){
      JHtml::_('jquery.framework');
  } else {
      JHTML::_('behavior.mootools');
      JFactory::getDocument()-&gt;addScript($this-&gt;baseurl.'/templates/'.$this-&gt;template.'/js/jq.min.js');
  }
  </code></pre>
  
  <p>Then inside of html of the index.php any jQuery code tells me that it is not defined. Why can it be?</p>
  
  <p>Thank you!!</p>