Monday, 05 June 2017 07:23

How to Add JQuery In Joomla

Including Jquery in your joomla 3 to load Joomla Calender

Resolving conflict with JQuery when including jquery library directly.

<script src=""></script>
<script> $(document).ready(function(){ $(".advance").click(function(){ $("div#advanceoption").slideToggle(); }); }); </script>

The method above failed to display Joomla Calender popup but toogle slider works properly .



With this method below both joomla calender pop up and toogle slider works perfectly

$doc = JFactory::getDocument(); JHtml::_('jquery.framework'); $doc->addScriptDeclaration(' jQuery(document).ready(function () { jQuery(".advance").click(function(){ jQuery("div#advanceoption").slideToggle(); }); }); ');