14

Is there a way to increase the duration of a tool tip displayed using the title attribute of an html tag?

Currently in IE it appears to only have about a 5 second duration and then disappears.

1

4 Answers 4

20

I think this is operating system dependent and you should not try to override that.

The best way will be to create a custom tooltip.

Here are some good ones

jQuery Tooltip Plugin Demo

2
  • 1
    +1 for being completely correct. OP should look for a nice lightweight tooltip library, there are tons.
    – timdev
    Oct 7, 2009 at 7:22
  • thanks! I wasn't sure if it was OS controlled of if it could somehow be set with css.
    – justinl
    Oct 7, 2009 at 7:24
2

How to increase default hover duration of title attribute (tooltip)

Dont use IE, no time limit in Firefox browser. Or use the code I done.

I made some code in html/css only in one file, could not make it easier.

<!DOCTYPE html><html><body><style>
.m span{display: none;list-style: none} .m {z-index:24;position:relative;display:inline-block}
.m:hover span{z-index:999;display:block;position:absolute;top:19px;left:1em;border:1px solid #000;background-color:#eee;color:#000;min-width:300px}
</style>
<div class="m"> News         <span> Links inside span works good <a target="_blank" href="http://cnn.com">Cnn.com</a></span></div>
<div class="m"> Hover over here and Information comes up <span> To make complex things easy is not so easy to do. </span></div> 
<br> Just som text here to give you the 3D effect <br>
</body></html>

1
  • This solution doesn't work well with search engines and screen readers.
    – Samer
    May 26, 2015 at 16:38
2

To elaborate further on phoenix' answer. Custom tooltips will allow you great flexibility in their appearance and layout. You need to get a JavaScript library (for example, jquery, or mootools) and get a plugin to show them. Then you will link the JQuery .js file, the plugin's one, and the css, finally you will add some markup to make it work.

For example, this one: http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ or this one: http://craigsworks.com/projects/simpletip/

They are usually quite simple to install, the only requirement is that your site supports javascript.

0
1

Try WZ tooltip (may no longer be maintained): Click here

1
  • Thanks for the link. This is a simple and quick alternative to using jQuery that I may end up using.
    – justinl
    Oct 8, 2009 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.