Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8416687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:50:05+00:00 2026-06-10T01:50:05+00:00

I have implemented HTML tooltips in d3.js following this example , using code like

  • 0

I have implemented HTML tooltips in d3.js following this example, using code like this:

function onmouseover(d) {
    $("#tooltip").fadeOut(100,function () {
        // generate tooltip
        $("#tooltip").fadeIn(100);
    });
}

function onmouseout() {
    $("#tooltip").fadeOut(250);
}

It works, but exhibits a behavior where if the mouse moves quickly over multiple nodes a tooltip may remain stuck on the page. The example above shows the same behavior (happy wiggling!).

Having done some research it seems that nvd3 has solved this problem beautifully using dispatch. However I’m not really clear on how dispatch works, and based on this question I imagine there may be a simpler approach in this case.

Update

This issue only arises due to fadeIn and fadeOut. If these are set to zero there is no problem. So the question really is whether it’s possible to set it up so that fadeIn/out are interrupted if there is another mouseover/out event.

Resolution

The problem was that there was only one tooltip. This couldn’t respond to events while in the middle of a JQuery fadeOut. The answer is to have multiple tooltips so one can be fading in while the old one is fading out. This can be achieved in two ways:

  • JQuery fadeOut
  • CSS transitions (the approached used by NVD3)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:50:06+00:00Added an answer on June 10, 2026 at 1:50 am

    NVD3’s solution is to run a cleanup method every time there’s a mouseout event on any node. See their source on line 78 here: https://github.com/novus/nvd3/blob/master/src/tooltip.js.
    This doesn’t have to be done through d3.dispatch; it can be done directly as well.

    You could also look into some of the workarounds suggested for reliably catching mouseout events: Why can't I reliably capture a mouseout event?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented following code: $('#select1').change(function() { var options = ''; if($(this).val() == 'a')
I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li
I have implemented the jQuery buttonset of radio buttons using this HTML: <div id=buttons>
I have implemented correctly bump's api, and added this code: - (void) configureBump {
I have implemented clean URLs using the following in my .htaccess RewriteEngine on RewriteCond
I have implemented column resizing with YUIs DataTable as demonstrated in this example: http://developer.yahoo.com/yui/examples/datatable/dt_complex_clean.html
I have implemented admob code as given in google site (http://code.google.com/mobile/ads/docs/android/fundamentals.html) as described in
I have implemented Tabbar in sencha touch without any content as follows: using code
I have a working version of tooltip (jQuery Tools - http://flowplayer.org/tools/demos/tooltip/index.html ) , jQuery(document).ready(function()
I have implemented a dynamic creation of a HTML table using AJAX. Here's what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.