Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla 3.X - Remove tooltip script from header?

I'm trying to remove unwanted scripts from my custom joomla template header, which I've managed to remove everything except for this:

<script type="text/javascript">
jQuery(document).ready(function()
                {
                    jQuery('.hasTooltip').tooltip({});
                });
  </script>

I've searched for hours and I've tried numerous things to get it removed, but I can't seem to get rid of it. Here's what I've done to remove the other scripts I don't want (for anyone else who has this issue):

# unset frameworks
JHtml::_('bootstrap.framework',false);
JHtml::_('jquery.framework',false);

# unset scripts
unset($doc->_scripts[$this->baseurl.'/media/jui/js/jquery.min.js']);
unset($doc->_scripts[$this->baseurl.'/media/jui/js/jquery-noconflict.js']);
unset($doc->_scripts[$this->baseurl.'/media/jui/js/bootstrap.min.js']);

If someone could help me remove that tooltip javascript, that would be fantastic. Oh and I don't want to touch the core files, so I'm trying to remove it from the template index.php file itself.

like image 353
SoulieBaby Avatar asked May 23 '13 22:05

SoulieBaby


1 Answers

Some component/Module/Plugin is calling the function JHTML::_('behavior.tooltip'). and that function add your code.

you can do:

The dirty way: go to libraries\cms\html\bootstrap.php and change the file at the method tooltip(). but remember it's a core file so upgrade can overide your changes.

The clean way, find the component that adds this code and remove or change it.

Good Luck

like image 95
amitgur Avatar answered Sep 27 '22 18:09

amitgur