Frage

I am having an issue displaying the tooltip only on my joomla 1.5 template (yes I know I should upgrade to a newer version of joomla, but unfortunately this option is not available in the moment) basically the code use is as getbootstrap website

  <button title="" data-placement="right" data-toggle="tooltip" class="btn btn-default" type="button" data-original-title="Tooltip on right">Tooltip on right</button>

and the js used

<script>
$(function () { jQuery("[data-toggle='tooltip']").tooltip(); });
</script>

This works fine in any template but when is added into joomla I get the following error on the jquery.min.js :TypeError : e is undefined Here's the image of the firebug console

enter image description here

War es hilfreich?

Lösung

I guess the $ operator is already used by mootools. To be jQuery safe use the following code

<script>
    var myjQuery = jQuery.noConflict();
    myjQuery(document).ready(function () {
        myjQuery("[data-toggle='tooltip']").tooltip(); });
    });
</script>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top