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 585623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:01:20+00:00 2026-05-13T15:01:20+00:00

I’m using a jquery flowplayer tools plugin http://flowplayer.org/tools/tooltip.html 1)I want a tooltip to be

  • 0

I’m using a jquery flowplayer tools plugin http://flowplayer.org/tools/tooltip.html

1)I want a tooltip to be created when user clicks on an element.

2)When the user clicks on another element, the old tooltip must be unlinked(deleted)

3)A new tooltip should be created(or old moved to) for the clicked element

4)So, there should <=1 tooltip on the page

Can you please help me?

Here’s the code, it runs standalone

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head>
    <title>jQuery tooltip</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
    <script src="http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js"></script>

    <script type="text/javascript">


/******* THIS FUNCTION IS JUST FOR TEST, REMOVE IT LATER *********/
    $(document).ready(function() {
        $("#_2").tooltip({ 
            effect: "slide", 
            tip: '.tooltip' ,
            position: 'bottom center'
        }); 

    });
/******* THIS FUNCTION IS JUST FOR TEST, REMOVE IT LATER *********/




/** The code below is not working as I expect, it doesn't MOVE tooltip **/

           var old_id;

    //first time - create tooltip
        function my_create(id){
            $("#"+id).tooltip({ 
                effect: "slide", 
                tip: '.tooltip', 
                position: 'bottom center'
            });     
        }

     //next times - move tooltip to other element
        function my_unlink(id){
            $("#"+id).unbind("mouseover"); 
            //todo
        }

        function my_link(id){
            //todo
        }


        //THE MAIN FUNCTION

        function do_tip(new_id){
            if(old_id){
                my_unlink(old_id);
                my_link(new_id);
                alert(new_id);
            }
            else
                my_create(new_id);

            old_id=new_id;
         //new_id.focus();
     } 

    </script> 

  <style>
    .tooltip {
      display: none;
      background:transparent url(http://flowplayer.org/tools/img/tooltip/black_arrow_bottom.png);
      font-size:14px;
      height:70px;
      width:160px;
      padding:25px;
      color:#fff;   
    }
    h1 {
      width: 400px;
      text-align: center;
      background-color: yellow;
    }

  </style>
</head>
<body>

    <h1 onclick="do_tip(this.id)" id="_1">John</h1>
    <h1 onclick="do_tip(this.id)" id="_2">Mary</h1>
    <h1 onclick="do_tip(this.id)" id="_3">Dan</h1>
    <h1 onclick="do_tip(this.id)" id="_4">Paul</h1>
    <h1 onclick="do_tip(this.id)" id="_5">Kim</h1>

    <div class="tooltip">There should be only one tooltip on a page!</div>

</body></html>
  • 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-05-13T15:01:20+00:00Added an answer on May 13, 2026 at 3:01 pm

    jQuery tools tooltip supports defining which events trigger the tooltip.

    You do not need to handle the click event by yourself.

    Edit: Updated the script. Click on the link to move the tooltip to the second element always.

    Here is the script

    var tt = $("h1").tooltip({
      events:{def:'click, click'},
      effect: "slide",
      tip: '.tooltip' ,
      position: "bottom center",
      api: true,
      delay: 30000
    });
    
    $("#ht").click(function() {
      tt.hide();
      $("#_2").tooltip().show();
    });
    

    The whole script

    <!DOCTYPE html>
    <html>
    <head>
    <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
    <script src="http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js"></script>
    
    <meta charset=utf-8 />
    <title>JS Bin</title>
    <!--[if IE]>
      <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <style>
      article, aside, figure, footer, header, hgroup,
      menu, nav, section { display: block; }
    </style>
    <style>
        .tooltip {
          display: none;
          background:transparent url(http://flowplayer.org/tools/img/tooltip/black_arrow_bottom.png);
          font-size:14px;
          height:70px;
          width:160px;
          padding:25px;
          color:#fff;   
        }
        h1 {
          width: 400px;
          text-align: center;
          background-color: yellow;
          cursor:pointer;
        }
    
     </style>
    
    </head>
    <body>
    
        <h1 id="_1">John</h1>
        <h1 id="_2">Mary</h1>
        <h1 id="_3">Dan</h1>
        <h1 id="_4">Paul</h1>
        <h1 id="_5">Kim</h1>
    
        <a id="ht" href="javascript:void()">Click here</a>
        <div class="tooltip">There should be only one tooltip on a page!</div>
    
    </body>
    </html>
    
    <script>
    
    var tt = $("h1").tooltip({
      events:{def:'click, click'},
      effect: "toggle",
      tip: '.tooltip' ,
      position: "bottom center",
      api: true,
      delay: 30000
    });
    
    $("#ht").click(function() {
      tt.hide();
      setTimeout(function(){$("#_2").tooltip().show();}, 500);
    });
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 294k
  • Answers 294k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Inside a servlet, the response content type ought to be… May 13, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer The documentation for GetParent explains: "Note that, despite its name,… May 13, 2026 at 6:33 pm
  • Editorial Team
    Editorial Team added an answer The "Returning cached instance of singleton bean" message is logged… May 13, 2026 at 6:33 pm

Related Questions

In order to apply a triggered animation to all ToolTip s in my app,
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I want use html5's new tag to play a wav file (currently only supported
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I've got a string that has curly quotes in it. I'd like to replace

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.