Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • how to import jquery in joomla

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 105
    Comment on it

    Hello readers, today I guide you "to import jQuery in Joomla"

    This can be a rule which we all utilize to guarantee that only 1 content involving jQuery can be imported. The idea merely tests to see in the event jQuery is already been imported and if not necessarily, subsequently we all have significance of the item.
    You can use the below code for practice:

      if(!JFactory::getApplication()->get('jquery')){
         JFactory::getApplication()->set('jquery',true);
         $document = JFactory::getDocument();
         $document->addScript(JUri::root() . "templates/template_name/js/jquery.js");
      }
    

    In joomla 3.x (no conflict mode):

    JHtml::_('jquery.framework');
    

    Joomla 3.x (normal mode):

    JHtml::_('jquery.framework', false);
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: