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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:39:02+00:00 2026-05-13T12:39:02+00:00

$(#id).tooltip({ effect: slide, tip: ‘.tooltip’ }); I want to delete the object created by

  • 0
$("#id").tooltip({ 
        effect: "slide", 
        tip: '.tooltip' 
    }); 

I want to delete the object created by this code.

“flowplayer jquery tools” plugin

This question has an answer described in the bottom of my post!

See the bottom if you don’t wanna loose you time

.

———-UPDATE———-

That should be something like this

The code:

<!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>

.

———UPDATE 2———-

Here’s the answer

Linking/unlinking jquery object to an element

The moral of this long tale is:

I’ve been thinking it’s a common, not code or plugin-specific question. I thought that the solution should be as simple as “destroy old tooltip object and then create a new one, attatched to other element”

  • 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-13T12:39:03+00:00Added an answer on May 13, 2026 at 12:39 pm

    You write that you want to delete the object created by the code.

    What the code does is that first searches for an element with id ‘ID’ in your page,
    let’s call this “the trigger”.

    I’m changing one thing in the code here: Instead of selecting the trigger by id ‘ID’
    I select using the class ‘do_tooltip_for_this’. This way I can set up a tooltip for
    multiple triggers at once.

    If the user moves the mouse over the trigger, an element with class ‘tooltip’, that is
    already present in the page, will be shown and positioned near that trigger.
    If the user moves the mouse away from the trigger this element is automatically hidden again.
    This works for several triggers as well, the same tooltip is reused.

    You can also hide the tooltip by hand by writing

      $('.tooltip').hide();
    

    You can disable the whole behaviour by writing

    $(".do_tooltip_for_this").unbind("mouseover"); 
    

    Here’s the whole code:

        <!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">
          var o;
        $(document).ready(function() {
    
        o = $(".do_tooltip_for_this").tooltip({ 
            effect: "slide", 
            tip: '.tooltip' ,
            position: 'bottom center'
        }); 
                      
        });
      </script> 
      <style>
        .tooltip {
          display: none;
          background:transparent url(http://flowplayer.org/tools/img/tooltip/black_arrow_bottom.png);
          font-size:12px;
          height:70px;
          width:160px;
          padding:25px;
          color:#fff;   
        }
        h1 {
          width: 400px;
          text-align: center;
          background-color: yellow;
        }
    
      </style>
    </head>
    <body>
    
        <h1 title="a tooltip regarding John" class="do_tooltip_for_this">This is John</h1>
        <h1 title="a tooltip regarding Paul" class="do_tooltip_for_this">This is Paul</h1>
        <h1 title="a tooltip regarding George" class="do_tooltip_for_this">This is George</h1>
       <h1 title="a tooltip regarding Ringo" class="do_tooltip_for_this">This is Ringo</h1>
    
        <div class="tooltip"></div>
    
    </body></html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Alternatively, this can be done with tags. //Set up the… May 14, 2026 at 4:27 pm
  • Editorial Team
    Editorial Team added an answer Pass looker in by reference, so that you can access… May 14, 2026 at 4:27 pm
  • Editorial Team
    Editorial Team added an answer You can print the entire stack trace by using a… May 14, 2026 at 4:27 pm

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.