Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery ui tooltip conflict with bootstrap 3 tooltip

I'm using bootstrap 3 for my project layout. and also i need to jquery.ui javascript file for parts of my page. the problem is both bootstrap and jquery ui has the tooltip function and i want to use bootstrap tooltip, but jquery ui tooltip show up. is there any way to disable jquery ui tooltip without any effect on other jquery ui functions?

like image 217
hamed Avatar asked Dec 27 '14 12:12

hamed


2 Answers

Solution is very very easy.

 <script src="/js/lib/jquery-ui.min.js"></script>
 <script src="/js/lib/bootstrap.min.js"></script>

Just load jQueryUI before loading boostrap and all will be ok! Worked for me.

like image 130
Mario Villani Avatar answered Oct 31 '22 13:10

Mario Villani


I was also facing the same issue and found a quick work around for this.

 <script src="/js/lib/bootstrap.min.js"></script>
 <script>var bootstrapTooltip = jQuery.fn.tooltip;</script>
 <script src="/js/lib/jquery-ui.min.js"></script>
 <script>jQuery.fn.tooltip = bootstrapTooltip;</script>

This will override jquery-ui's tooltip and use bootstrap's tooltip.

like image 23
Bhagyesh Jain Avatar answered Oct 31 '22 13:10

Bhagyesh Jain