question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tooltop.js problem when another tooltip is initialize

See original GitHub issue

This happen when another tooltip is setup after the previous tooltip is setup.

Problem at tooltip.js#L16

The previous container of the tooltip is remove after the second tooltip is setup.

<a id="tp1" class="btn tooltipped col s4 offset-s4 l2 offset-l1" data-position="bottom" data-delay="50" data-tooltip="I'm TP1!">TP1</a>
<a id="tp2" class="btn tooltipped col s4 offset-s4 l2 offset-l1" data-position="bottom" data-delay="50" data-tooltip="Goodbye TP1!">TP2</a>
<script>
$(document).on("click", "#tp1", function(){
    if (!$("#tp2").is(".ok")){
        $("#tp2").addClass("ok").tooltip();
    };
});
$("#tp1").tooltip();
</script>

Check this https://jsfiddle.net/8wxa2pym/

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
merlano17commented, May 3, 2016

There is simple solution for this for the time being till they fix it I use this

setInterval(clearTooltip, 6000);
function clearTooltip() {
    $('.material-tooltip').hide();
  }

So every 6 seconds it will hide all the tooltips which are not closed correctly and stuck on the screen
0reactions
fegacommented, Apr 4, 2017

I tested the fiddle example with the latest version and it worked, please reopen if you are still having the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

why bootstrap tool-tip is not initializing two times?
Therefore when you called tooltip a second time it would not initialize the tooltip again. Because of the following line:
Read more >
Bootstrap Tooltip Plugin - W3Schools
The Tooltip plugin is small pop-up box that appears when the user moves the mouse ... Note: Tooltips must be initialized with jQuery:...
Read more >
JavaScript - Bootstrap
For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself. One way to initialize all tooltips on...
Read more >
Tooltip Widget - jQuery UI API Documentation
As a result, jQuery UI does not guarantee any level of support for tooltips attached to disabled elements. Unfortunately, this means that if...
Read more >
How to initialize Bootstrap tooltip in JavaScript not jquery in ...
Currently I am using Vue/Nuxt.js and I am trying to initiate a Bootstrap tooltip using java script. I am aware it can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found