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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:23:39+00:00 2026-06-03T01:23:39+00:00

A tooltip library is copying the dom node to insert the html inside a

  • 0

A tooltip library is copying the dom node to insert the html inside a tooltip.

I need to target the element inside the tooltip, but the javascript is always applied to the original element.

 <a class="tooltip">Open</a>

<div class="tooltip-html" style="display:none;">
<div id="main-content" class="scroll">
    <div class="Content">
        <div class="blue">
        </div>
    </div>
</div>

I have tried using the enter callback of the tooltip, this was not working. And applying things before the html is copied by the tooltip only cosmetically works, the javascript is still looking at the original. I even tried changing the class before I apply anymore javascript. Figuring if I changed the class the original element would no longer be accessible. The class changed, but the javascript was not applied to what was inside the tooltip.

Is there a good way remove a div once it has been copied, or a better method of finding/targeting the correct element.

$(this).find("div.scroll").test();

EDIT:

...Before...
    <div id="main-content" class="scroll">
    <div class="Content"> 

...After...

<div id="tiptip_holder" style="max-width: 230px; margin: 23px 0pt 0pt 999px; display: none;" class="tip_left_bottom">
<div id="tiptip_arrow" style="margin-left: 220px; margin-top: -12px;">
<div id="tiptip_content">
    <div id="main-content" class="scroll">
    <div class="Content"> 
    ....

The this was a part of the enter callback for the tooltip library:

 var tip_html = $('.tooltip-html').html();
    $('.tooltip').tipTip({ content: tip_html, enter: function(){
        $(this).find("div.scroll").test();

    }

Also tried using,

$("#main-content.scroll", "#tiptip_content").test();

UPDATE:

As people mentioned naming the parent div like I was should of worked, here’s an example of how i’m not able to target inside the tooltip.

jsfiddle.net/mstefanko/pUm5V/24

//$("#main-content", "#tooltip-content").css("background", "red");
$("#main-content", "#tiptip_content").css("background", "blue");

Blue doesn’t work, red does. I feel like both lines should work.

  • 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-03T01:23:42+00:00Added an answer on June 3, 2026 at 1:23 am

    Found the main cause of my issue. The following lines in the plugin:

    function active_tiptip(){
        opts.enter.call(this);        
        tiptip_content.html(org_title);
    

    the enter call was being called before any of the tooltip content was in the DOM, as much as the wrappers for the tooltip existed, calling main-content when it wasn’t in the tooltip yet will obviously fail to work. Not sure i’ve completely solved my issue, but reversing these lines fixes the question at hand.

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

Sidebar

Related Questions

I have tooltip(prototip, but it doesnt matter) on my page in javascript and I
can anyone recommend me nice tooltip script which is javascript library independent, meaning no
I just tried the tooltip like this Easy image preview ... But i cant
I have a tooltip on an anchor element, that sends an AJAX request on
I have a simple tooltip which has long JavaScript code in the divs. I
I am attempting to use the highcharts javascript library to load charts using this
I need to put different information in separate lines, I have a working Javascript
i am using the js library qtip tooltip. I want to make the qtip
It seems so hard to find a easy to use tooltip for Prototype library.
i tried this http://developer.android.com/guide/tutorials/views/hello-tabwidget.html but it uses deprecated tabactivity, and eclipse suggested I use

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.