3

I didn`t understand why my bootstrap tooltip not work. when i add title attributes to element and hover on it, title attributes set to null and add one other element call area-describedby.

<button id="test" type="button" class="btn_primary" title="" aria-describedby="ui-tooltip-5">Tooltip on left</button>
<div id="ui-tooltip-3" role="tooltip" class="ui-tooltip ui-widget ui-corner-all ui-widget-content" style="position: relative; top: -5px; left: 0px; display: block;"><div class="ui-tooltip-content">Tooltip on left</div></div>

I compared with this fiddle: http://jsfiddle.net/52VtD/31/

Any idea why this is happening?

i am currently use this bootstrap and jquery version
Bootstrap v3.3.4
jQuery v2.1.4
jQuery UI - v1.11.2 - 2014-10-16
Kaushik solanki
  • 438
  • 3
  • 15

2 Answers2

9

I got the solution,

use jquery-ui.min.js before bootstrap.min.js

This error occured to conflict 2 js file..

Kaushik solanki
  • 438
  • 3
  • 15
0

I tried to solve it, but I could not understand. I set a breakpoint on that jquery function (with all the buttons), but I could not trigger those breakpoints. Somehow watching at the DOM I have noticed that those buttons have some event handlers, some of the more interesting are mouseover. Which I think are the one triggering the .tooltip() function. They add some div to the page, but i need to solve this later. So I am posting this message as a memo.

Thanks Fabrizio enter image description here

Fabrizio Bertoglio
  • 5,890
  • 4
  • 16
  • 57
  • 1
    i got reason of problem but don't know how to solve. I use Bootstrap and jquery-ui both together that's why tooltip not display.. if u have any solution please tell me. Thank's kaushik :) – Kaushik solanki Mar 14 '17 at 13:28
  • 1
    if i comment jquery.ui from my page it's work.. but with jquery.ui it's not – Kaushik solanki Mar 14 '17 at 13:29
  • @Kaushiksolanki sorry i tried to find a solution. I can not figure out. I am not so expert with jquery. I tried with `.mouseover()` but it does not work, the `.tooltip()` effect comes from `bootstrap.min.js`. The event triggered is at line 502 of `jquery-3.1.1.js `. This function get called allways. I think that tooltip does not come from your code, but from the jquery code. If you set a breakpoint there, it is called on mouse over while it is not in your javascript code. – Fabrizio Bertoglio Mar 14 '17 at 18:27
  • 1
    It's okay dear, i got thesolution and post my answer. thank's for your kind response :) – Kaushik solanki Mar 15 '17 at 12:52