By default joomla have some default js. Some time we need to remove the default js. last week my friend asked me to remove mootools.js in his project i searched via the Best Friend (Google) and i got some idea. Here is the solution to remove mootools from joomla
$document =& JFactory::getDocument();
foreach ($document->_scripts as $key=>$val) {
if (stripos($key, 'mootools.js') !== false) {
unset($document->_scripts[$key]);
}
}
Similar way we can remove any js , just replace with 'mootools.js' with 'yourjsname'.
No comments:
Post a Comment