문제

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

도움이 되었습니까?

해결책

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top