Hello All,
i m newbie to joomla, although i have worked a lot with jQuery so i feel comfortable in jQuery rather than mootools, now i m developing a joomla component, so what i do..
on
joomla/administrator/component/com_property/admin.controller.php
i write below code
defined('_JEXEC') or die('Restricted access');
JHTML::_('behavior.mootools');
$document =& JFactory::getDocument();
$rootURL = JURI::root();
$document->addScript($rootURL.'media/system/js/jquery.min.js' );
now when i go to add a property from
http://localhost/joomla/administrator/index.php?option=com_property&view=addProperty
Actualy there is select boxes of province & city,on changing province, select box of city changes dynamically, i write
jQuery.getJSON(?option=com_property&view=ajaxdata&format=raw)
everythings was working fine when i add jQuery.noConflict();
on that specific page
/joomla/administrator/components/com_property/views/addproperty/tmpl/default.php
BUT if i add
$document->addCustomTag('jQuery.noConflict();');
on admin.controller.php
it display below error in firbug console
Fatal error: Call to undefined method JDocumentRAW::addCustomTag() in /opt/lampp/htdocs/joomla/administrator/components/com_property/admin.controller.php on line 22
please suggest me how to handle this problem,
actually what i want is
- i want o include jquery throughout the website
- also want to include
jQuery.noConflict()
, so that there shoud be no confliction between jQuery & Mootools( internally used by joomla), bcoz if i remove addCustomTag() method fromadmin.controller.php
, then i need to addjQuery.noConflict()
on each page where i use jQuery and that is voilation of DRY concept
please suggest me how to use jQuery in joomla without confliction on all pages of website.
Thank you for Support me always