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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:55:28+00:00 2026-06-01T06:55:28+00:00

I have a simple tooltip which has long JavaScript code in the divs. I

  • 0

I have a simple tooltip which has long JavaScript code in the divs. I would to make it as simple as possible.

Here is my code:

  <div onmouseover="document.getElementById('tt1DX1').style.display='block'" onmouseout="document.getElementById('tt1DX1').style.display='none'" style="position:relative;">Tool
    <div id="tt1DX1" class="toolTip_new pbc11_ttpos1_1Q_di" style="display: none;">
      <div class="tool_wrapper">
        <div class="tooltip_top_new"></div>
        <div class="tooltip_middle_new">
          <div class="content">
            <p>Please holder actuall text</p>
            <p>Please holder actuall text</p>
            </div>
          </div>
        <div class="tooltip_bot_new2"></div>
        </div>
      </div>
    </div>

css

.tooltip_top_new{
    background:url(../images/n_tooltip_top.png) no-repeat;
    height:9px;
    width:212px;
}
.tooltip_middle_new{
    background:url(../images/n_tooltip_middle.png) no-repeat;
    width:212px;
}
.tooltip_middle_new .content{
    padding:2px 13px 1px;
}
.tooltip_middle_new .content p{
    line-height: 1.3;
    margin-bottom: 1em;
    text-align: left;
}
.tooltip_bot_new2{
    background:url(../images/n_tooltip_bot2.png) no-repeat;
    height:21px;
    width:212px;
}



.Question_di{
    position:relative;
}
.pbc11_ttpos1_1Q_di {
    border: 0 solid #FF0000;
}
.toolTip_new {
    background: none repeat scroll 0 0 transparent;
    color: #5C5C5C;
    display: none;
    font: 10px/12px Tahoma,Geneva,sans-serif;
    left: -173px;
    top: -90px;
    position: absolute;

    z-index: 1000;
}

The thing is that I have to copy & paste onmouseover="document.getElementById('tt1DX1').style.display='block'" onmouseout="document.getElementById('tt1DX1').style.display='none'" wherever I’m using the tooltips, I would like to avoid it.

  • 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-01T06:55:29+00:00Added an answer on June 1, 2026 at 6:55 am

    JQueryTools includes a Tooltip module which will get rid of a big chunk of your code.

    http://jquerytools.org/demos/tooltip/index.html

    It’s also possible to create tooltips with no JavaScript at all, using HTML and CSS along these lines:

    <div class="has-tooltip">
      <button class="huge red">You Know You Wanna...</button>
      <div class="tooltip">Do NOT Press This Button.</div>
    </div>
    

    And in CSS:

    .has-tooltip .tooltip {
      position: absolute;
      display: none;
    
      <style code to position (with margin-left and margin-top)
       and make the tooltip box look how you want>
    
    }
    
    .has-tooltip:hover .tooltip {
       display: block;
     }
    

    Google “CSS Tooltips” to see lots of examples.

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

Sidebar

Related Questions

I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have a simple tooltip that has the following CSS /* tooltip for buttons
I have a div element which I append to body element $('<div class=tooltip></div>').appendTo('body'); and
I have a simple html multiline tooltip implementation: this.tooltip = function(tag) { xOffset =
I have simple SSIS package which reads data from flat file and insert into
I have simple SSIS package in which On Error event handler I have created
What I am trying to do is to have a very simple tooltip that
I have a simple WPF application with a button whose tooltip is binded to
I have a textbox that has the following simple XAML (not necessary to read
I have simple regex \.*\ for me its says select everything between and ,

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.