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

  • SEARCH
  • Home
  • 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 9124859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:39:51+00:00 2026-06-17T06:39:51+00:00

Hello my fellow developers, I have some trouble polishing my UI. I’ve made a

  • 0

Hello my fellow developers,

I have some trouble polishing my UI.

I’ve made a popup panel, that opens when I hover over a button/link.

this panel should close whether I go out of that button/link or out of the panel itself. Pretty straight forward.

HERE (jsFiddle) I made a simple demonstration, and it works well as expected.

my JS code:

$('[data-tip]').tipsy({fade: true, gravity: 's'});

$('#btn').mouseenter(function(e){
  $('#panel').show();
}).mouseleave(function(e){
  var $panel = $('#panel')[0];  
  var $out_el = $(e.relatedTarget)[0];

  if($out_el != $panel){
    $('#panel').hide();
  }
});

$('#panel').mouseleave(function(e){
  var $btn = $('#btn')[0];  
  var $out_el = $(e.relatedTarget)[0];
  var $tipsy = $('.tipsy')[0];

  if($out_el != $btn && $out_el != $tipsy){
    $('#panel').hide();
  }
});

and HTML markup

<a href="#" id="btn">BUTTON</a>

<div id="panel">
  <a href="#" title="1" data-tip="test 1">Test anchor 1</a>
  <a href="#" title="2" data-tip="test 2">Test anchor 2</a>
</div>

The problems are tips. (jquery tipsy plugin to be exact).
In the example I provided I put 2 links inside my popped up panel. Both have a tipsy attached. So on hover a tip is shown. All well.

The problem is that if I touch the tip, the panel closes. I DON’T WANT THAT.
So I added another check on my onmouseleave event… to check if the “leave element” is tipsy…

but the problem (I guess) is that tipsy destroys before my event, so I cannot check if “leave element” is tipsy or not. (for $(‘.tipsy’) I get empty and of course $(‘.tipsy’)[0] is undefined.

please advise!

  • 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-17T06:39:52+00:00Added an answer on June 17, 2026 at 6:39 am

    Working demo

    The condition of your mouseleave is making it hide. Try this instead.

    $('#panel').mouseleave(function(e){
      if (e.target==this) $(this).hide();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello fellow developers. I have previously made a facebook fan page with an iframe
Hello fellow programmers, I have made a function that looks up the database if
hello fellow java developers. I'm having a bit of an issue here. I have
Hello fellow developers. I have a Grid View in an android application. The grid
Hello fellow programmers. I have a SQL Server 2005 query that is taking a
Hello fellow stakoverflowers, I'm having a problem with PHP/Apache. I have an application that
my fellow developers! I hope very much that at least some of you will
Hello fellow developers, I am a little stumped on this one as I have
Hello my fellow ColdFusion developers! I'm trying to learn node.js, and I have a
Hello Fellow C# and Windows phone developers, For my windows phone application, I have

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.