More than 800+ satisfied clients and counting, since 2010

Blog

Importing jQuery into Joomla run Websites

Importing jQuery into Joomla

Importing jQuery into JoomlaJoomla content management system is an easy to use CMS. It has the right blend of advanced and user friendly features. Using jQuery you can add more functionality to the Joomla run website. But for this there is a need for importing jQuery into Joomla. Before mentioning how to import jQuery, let us first consider the problems faced while importing jQuery into Joomla.

Problems Faced While Importing jQuery into Joomla

Some of the main problems faced to import jQuery into Joomla are highlighted below:

  • After importing jQuery the site crashes.
  • The site may also slow down on importing jQuery into Joomla.
  • jQuery conflict when used with mootools.

Importing jQuery into Joomla Correctly

Consider the following code to import jQuery into Joomla correctly.

<?php

// load jQuery, if not loaded before

if(!JFactory::getApplication()->get(‘jquery’)){

JFactory::getApplication()->set(‘jquery’,true);

$document =& JFactory::getDocument();

$document->addScript(JURI::root() . “templates/template_name/js/jquery-1.8.2.js”);

} ?>

If you are still facing problems while importing jQuery then request a quote.

Written by

The author didnt add any Information to his profile yet