web design

Style-my-tooltips jQuery plugin

Style-my-tooltips jQuery plugin

A simple, lightweight jQuery plugin to enhance the look of browser tooltips. Small in size (4kb unminified) script that works just like browser’s native tooltips with few options and styling via CSS. If you ever wished for altering the default look of browser tooltips for your project, read on!

Style-my-toolips does exactly what its title says: styles browser default tooltips. The javascript generated tooltip behaves and functions exactly like browser’s native tooltip, meaning it is always visible within the viewport and its position is relevant to cursor position. Please note that this is not a fixed positioned modal pop-up tooltip. You cannot insert html code in it (links, images etc.). The script gets elements with title attribute and generates tooltips with the attribute text.

How to use it

Download the archive which contains the plugin files and demo. Extract files and upload jquery.style-my-tooltips.js and style-my-tooltips.css to your web server.

Include style-my-tooltips.css inside the head tag your html document

<link href="style-my-tooltips.css" rel="stylesheet" type="text/css" />

Include jquery and jquery.style-my-tooltips.js in your html document

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="jquery.style-my-tooltips.js"></script>

The code above can be inserted inside the head tag or at the very bottom of your document, before the closing body tag (which is normally recommended for better performance). In either case, it’s more efficient to include css files before any javascript (usually inside the head tag). As usual, we’re using Google’s CDN to get the jquery library.

What these files do

jquery is the javascript library used by the plugin (info: jquery.com).

jquery.style-my-tooltips.js is our plugin file

style-my-tooltips.css is the css file we use to style our tooltips. You could of course put the tooltip styling in your main stylesheet document to reduce http requests.

Call style_my_tooltips function on document ready (after the inclusion of the plugin files), either in the head or body tag

<script>
    (function($){
        $(document).ready(function(){
            $("[title]").style_my_tooltips();
        });
    })(jQuery);
</script>

Note that we’re wrapping our jquery code with (function($){ ... })(jQuery);. This ensures no conflict between jquery and other libraries using $ shortcut. See Using jQuery with Other Libraries for more info. Calling our function on document ready ($(document).ready()) is the standard, most common way used. It roughly means that our code will execute after the DOM is ready.

The [title] selector means that the plugin will apply to any element with title attribute (e.g. <a href="#" title="Link title">link</a>).

You can change the function call selector to anything you want (an id, class name etc.). For instance, to apply the custom tooltip on elements with title attribute that have a specific class (e.g. .myClassName) you change the selector as follows:

$(".myClassName[title]").style_my_tooltips();

You can also have multiple selectors by inserting comma separated values. For example the following applies only to anchor and image elements with title attribute:

$("a[title],img[title]").style_my_tooltips();

That’s all you need to use the plugin.

Configuration

style_my_tooltips function can get the following option parameters in order to customize its behavior and basic functionality:

tip_follows_cursor: Boolean
Tooltip follows cursor when hovering an element, values: true, false
tip_delay_time: Integer
Tooltip delay before displaying, value in milliseconds
tip_fade_speed: Integer
Tooltip fade in/out speed, value in milliseconds
attribute: String
Tooltip text source. Set an alternative attribute as source of the tooltip text (default is “title”)

An example of defining these options parameters and their default values is as follows

$("[title]").style_my_tooltips({ 
    tip_follows_cursor:false,
    tip_delay_time:700,
    tip_fade_speed:300,
    attribute:"title"
});

I’ve set the default values to simulate the exact behavior of native browser tooltips.

Styling your tooltip

You can style the tooltip via the style-my-tooltips.css file. The css below is the default one you can see on the demo.

#s-m-t-tooltip{
  /* basic */
  max-width:300px;
  z-index:10;
  margin:24px 14px 7px 12px;
  /* style and design */
  padding:8px;
  background:#222; /* fallback if rgba not supported */
  background:rgba(0,0,0,0.8);
  -moz-border-radius:3px;
  -webkit-border-radius:3px;
  border-radius:3px;
  -moz-box-shadow:2px 2px 0 rgba(0,0,0,0.15),-1px -1px 0 rgba(255,255,255,0.3);
  -webkit-box-shadow:2px 2px 0 rgba(0,0,0,0.15),-1px -1px 0 rgba(255,255,255,0.3);
  box-shadow:2px 2px 0 rgba(0,0,0,0.15),-1px -1px 0 rgba(255,255,255,0.3);
  /* font */
  font-family:Verdana,Geneva,sans-serif;
  font-size:11px;
  line-height:16px;
  color:#fff;
}

Changelog

  • Jul 25, 2012
    • Added new attribute option for setting tolltip source.
      Minor code optimizations.
  • Jun 8, 2012
    • Complete plugin update. I’ve taken user input and feedback and re-wrote and optimized the code significantly. Changes include:
      Plugin automatically applies to dynamically generated elements.
      Tooltip default position is exactly like the browser’s native tooltips.
      Fixed all bugs regarding tooltip position when scrolling the page and hovering fixed or absolute elements. The tooltip is now always visible and correctly positioned.
      After extensive testing, elements original title attributes are re-applied on mouseout, click and mousedown events. With the added mousedown event, you can use the plugin along with complex web apps and pages.
  • Feb 7, 2012
    • Minor change in code to better position the tooltip.

License

You are free to use, study, improve and modify this script wherever and however you like.
Creative Commons License All works are licensed under GNU General Public License, GNU Lesser General Public License or Creative Commons Attribution 3.0 Unported License.


82 Comments

Post a comment
  1. Cindy
    Posted on May 11, 2013 at 21:11 Permalink

    Hello, i’m new to web desing so my questions is probably really stupid… how do i upload .js and .css to my web server (google chrome)?

    Reply
  2. Austin Gun Trust
    Posted on March 5, 2013 at 13:43 Permalink

    Brilliant tooltip! It looks so simple. This tooltip could be very useful for clean and simple websites.

    Reply
  3. Russell White
    Posted on February 27, 2013 at 03:41 Permalink

    The fix which asaf posted worked for me. I tried at least two other tooltips in a Fancybox enabled Arles-generated gallery and this one beats them hands down.

    Thanks for a great script!

    Reply
  4. Korvoj
    Posted on January 17, 2013 at 22:35 Permalink

    Hello~ I tried using this lovely scrip in my tumblr. theme and it works fine as long as I dont scroll. After scrolling the z-index doesn’t work anymore no matter how large the number. If you have time please help.

    Reply
  5. Rhonda
    Posted on November 17, 2012 at 18:56 Permalink

    I’m working on a Joomla site whose template is using this plugin. I am seeing the following error when I debug in Chrome: Uncaught TypeError: Cannot call method ‘style_my_tooltips’ of null Suggestions?

    Thanks!

    Reply
  6. jvdheuvel
    Posted on September 29, 2012 at 10:56 Permalink

    I think it’s beautiful. I use it on my site. However when I started using it my Slick Social Share Button plugin stopped srolling. I switched it of it was a bit too slick for me anyway. Hopefully that is the only plugin that doesn’t like the tooltips plugin.

    http://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-slick-social-share-buttons/

    Reply
  7. WG Kirschner
    Posted on August 19, 2012 at 19:24 Permalink

    hello malihu,
    It is some time ago since I tried your tooltip – old version (post-nr: 25) – opportunity! was at that time not possible! now I’ve found you’ve installed time-delay and z-index – very good – and I want to try your tooltip happy again. But have a question: would like to use on my site multiple tooltips (with hover), the tooltips are in DIV TAGS. Is this possible or how I do it, it works. Title I do not want to use, can be used also a backgrond-image instead of title? Excuse me if you like my. Ask anything unusual happen, but I’m not a jQuery expert and only superficially familiar with javascript.

    thanks WG Kirschner

    Reply
  8. londonfire93
    Posted on July 4, 2012 at 08:18 Permalink

    i really like your plugin but i seem to be running into an issue. the plugin works when item is being hovered but it will not display the text it just shows a tiny box. i cant seem to figure out the problem . can you please help?

    function

    (function($){
    $(document).ready(function(){
    $(“[Tooltip]“).style_my_tooltips();
    tip_follows_cursor:true
    tip_delay_time:700
    tip_fade_speed:300
    });
    })(jQuery);

    fuction being used here

    Reply
  9. Ali
    Posted on July 3, 2012 at 15:34 Permalink

    It’s not working for me why :( (( ?

    Reply
  10. Rodrigo
    Posted on June 8, 2012 at 19:05 Permalink

    Hey man, can you check out your script?
    When I put this code in my document works well
    <script> (function($){ $(document).ready(function(){ $("[title]").style_my_tooltips(); }); })(jQuery); </script>

    Now, when I put the alternate code for customize the tooltip, it doesn’t works at all (I’ve tried everithing to make it , but nothing happens, also I’ve tried to change it directly in your demo page, but even there, doesn’t works!!).
    <script> (function($){ $(document).ready(function(){ $(&quot;[title]&quot;).style_my_tooltips({ tip_follows_cursor:true, //boolean tip_delay_time:0, //milliseconds tip_fade_speed:0 //milliseconds }); })(jQuery); </script>

    Please check it out, with the previous script before you actualize it today, I had no problems at all, and now this.
    Sorry if my english is bad, hope for finding a solution and thanks for your time.

    Reply
    • malihu
      Posted on June 8, 2012 at 23:27 Permalink

      You’ve missed closing document ready function. You need an extra }); after style_my_tooltips function closes.
      The code above should be:

      <script> (function($){ $(document).ready(function(){ $("[title]").style_my_tooltips({ tip_follows_cursor:true, //boolean tip_delay_time:0, //milliseconds tip_fade_speed:0 //milliseconds }); }); /* <- this is what's missing */ })(jQuery); </script>

      Reply
      • Rodrigo
        Posted on June 9, 2012 at 02:26 Permalink

        OMG, So true… thanks for the help man! cheers!

        Reply
  11. Ingo
    Posted on April 27, 2012 at 19:08 Permalink

    Hi malihu,

    awesome plugin – short and simple.

    Until now I used the Tooltip Plugin
    Tipsy but it´s over now ;-) .

    For better IE integration an for older FF:
    In “style-my-tooltip.css” on line 9:

    display:inline-block; /*important*/

    I changed it into
    display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; /*important* Supported display: inline-block for IE 6-7 and FF < 3, too /


    Thanks for sharing – Great.

    Bye
    Ingo

    Reply
    • malihu
      Posted on April 28, 2012 at 00:28 Permalink

      Awesome! Thank you for your comments and for taking the time to post your css changes :)

      Reply
  12. Matthew
    Posted on March 16, 2012 at 01:49 Permalink

    Hi. Great and simple tootltip. After changing the position to absolute all is much better, but I would like to add a little tweek so that the tooltip fades out after a timeout even if the tooltip is still hovering over the object it relates to … if you see what I mean.

    Since if one scrolls whilst hovering on an object, the tooltip also scrolls up or down. Especially with the two finger scroll on a mac trackpad. I don’t know if I am explaining myself very well. It just doesn’t look nice when the tooltip text scrolls with the page when you are still hovering on the object that triggered it…

    Still pretty neat little plugin must say.

    Reply
  13. κατασκευή ιστοσελίδω
    Posted on March 15, 2012 at 00:39 Permalink

    I am having the same problem as agentmilindu… any ideas that could help?

    Reply
  14. agentmilindu
    Posted on March 12, 2012 at 08:45 Permalink

    Tool-tips seems not changing when title is dynamically changed using jquery attr()
    ,any help? However a great plugin, thanks!

    Reply
    • malihu
      Posted on June 9, 2012 at 00:23 Permalink

      I’ve just updated the plugin to work correctly with dynamically generated content and on-the-fly changing title attributes ;)
      Re-download it and check the updated implementation guides on this post.

      Reply
  15. Roman
    Posted on March 11, 2012 at 10:57 Permalink

    Thanks a lot Mirrorshade. I solved the bug with your solution.
    im using the plugin here: http://vippazintys.lt

    thanks a lot for author!

    Reply
  16. Todd
    Posted on March 9, 2012 at 19:58 Permalink

    of course this stripped out a lot of code.

    <link href="/style-my-tooltips.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/jquery.style-my-tooltips.js"> $().ready(function() { //applies to all elements with title attribute. Change to ".class[title]" to select only elements with specific .class and title $(".mainnav[title]").style_my_tooltips({ tip_follows_cursor: "on", //on/off tip_delay_time: 1000 //milliseconds }); });

    Reply
    • Todd
      Posted on March 9, 2012 at 20:39 Permalink

      Never mind. I added code to footer just after wp_footer and it works great! Thanks for a nice script.

      Reply
  17. Todd
    Posted on March 9, 2012 at 19:56 Permalink

    I’m trying to put this in my header.php for a WordPress site and I can’t get it to work. Here’s the code in my header file. This is meant to be applied to the Main Nav links(.mainnav) in the same file.

    <link href="/style-my-tooltips.css” rel=”stylesheet” type=”text/css” />

    <script type="text/javascript" src="/jquery.style-my-tooltips.js”>

    $().ready(function() {
    //applies to all elements with title attribute. Change to “.class[title]” to select only elements with specific .class and title
    $(“.mainnav[title]“).style_my_tooltips({
    tip_follows_cursor: “on”, //on/off
    tip_delay_time: 1000 //milliseconds
    });
    });

    Reply
  18. Linda
    Posted on December 19, 2011 at 03:36 Permalink

    I have the same issue as JP. It works fine if you don’t scroll at all. But if you scroll even the slightest, and hover over the same image, you’ll find the tooltip about 200px+ below the cursor… Anything under the fold seems to have the title text completely removed. As in, they go poof from the code. Rather puzzling.

    The same issue occurs in IE9, Chrome 16.0.912.63 and FF 8.0.1.

    Reply
    • Devatics
      Posted on January 6, 2012 at 16:45 Permalink

      I had the same issue with scrolling. If I scrolled too much, the tooltip did not appear.

      Here is the fix I made :
      in the jquery.style-my-tooltips.js file look around line 23 for if(leftOffset<=$(window).width()) and replace this block and the following with :

      if(leftOffset <= ($(window).width() + $(window).scrollLeft()) ){
      smtTip.css("left",smtMouseCoordsX+cursor_tip_margin_x-$(window).scrollLeft());
      } else {
      var thePosX=smtMouseCoordsX-(cursor_tip_margin_x)-$(smtTip).width();
      theposX-=$(window).scrollLeft();
      smtTip.css("left",thePosX);
      }
      if(topOffset <= ($(window).height()+$(window).scrollTop()) ){
      smtTip.css("top",smtMouseCoordsY+cursor_tip_margin_y-$(window).scrollTop());
      } else {
      var thePosY=smtMouseCoordsY-(cursor_tip_margin_y)-$(smtTip).height();
      thePosY-=$(window).scrollTop();
      smtTip.css("top",thePosY);
      }

      I tested it on Firefox 8, Chrome 16 and IE8 and it works fine.

      Reply
  19. JP
    Posted on November 11, 2011 at 22:56 Permalink

    correction *height of page above the top of browser is greater than the distance from mouse to bottom of browser*

    Reply
  20. JP
    Posted on November 11, 2011 at 22:53 Permalink

    love these tooltips; thanks for the work!

    found a glitch (and sounds like it’s on my end) but hoping you have seen this before.

    everything works as it should, however, when I scroll a page below the fold, the tooltip is offset by the height of the page above the fold. At a certain point the tooltip is not even visible as the height of page above fold is greater than the distance from mouse to bottom of browser.

    hoping there is a quick fix. thanks!

    Reply
  21. jucelin
    Posted on November 7, 2011 at 08:28 Permalink

    Thanks. Great job.

    Reply
    • Bar
      Posted on November 11, 2011 at 20:13 Permalink

      Unfortunate not working in IE9

      - Native title not stripped, so double Tootltips
      - On mouseout the tooltip is not releasing

      Reply
      • malihu
        Posted on November 11, 2011 at 21:29 Permalink

        I’ve tested the plugin on Internet Explorer 9 (version 9.0.8.112 on windows 7) and it works as expected. Can you provide any details on version/OS? Also, did you checked the demo or other implementation?

        Reply
  22. RC
    Posted on September 1, 2011 at 13:42 Permalink

    Hi, I am having trouble getting this script to work with special characters: “æ” “ø” “å”.

    Any idea what might fix this?

    Thanks in advance.
    -RC

    Reply
    • RC
      Posted on September 6, 2011 at 14:53 Permalink

      (and I have tried with charset UTF-8 but no luck..)

      Reply
  23. Damon
    Posted on August 29, 2011 at 22:27 Permalink

    Great script and tutorial. Thanks for providing! I’m using it on this site I’m developing on the top-right corner icons, but can’t figure out how to center the tooltip under each icon. Any clues? Thanks for your awesome work.

    Reply
    • Damon
      Posted on August 29, 2011 at 22:28 Permalink

      oops I meant to provide a link: http://dev.jessecology.com

      Reply
    • malihu
      Posted on August 30, 2011 at 16:12 Permalink

      Hi,
      This tooltip cannot be centered as it’s not positioned according to elements. It positions itself according to cursor exactly like native browser tooltips plus it calculates its position so it is always visible on browser viewport.

      Reply
  24. WG Kirschner
    Posted on August 19, 2011 at 15:30 Permalink

    Hallo malihu,
    verry nice tool as i’ve seen on your demo .
    now my question:
    is there any possibillity to style the box of tooltip to my color – border – font ect.?
    please send me yuur mail – with a realy bit claer description. because i’m not so familiare
    with the programming-code in jquery.
    thx
    WG

    Reply
    • malihu
      Posted on August 19, 2011 at 15:53 Permalink

      Hi,
      You don’t need any js/jquery skills ;)
      The styling of the tooltip (color, background, borders etc.) is done via CSS (by editing style-my-tooltips.css).

      Reply
      • WG Kirschner
        Posted on August 19, 2011 at 21:14 Permalink

        Hi Manos,
        ok ok!!
        Thank you for the tip.
        Another Poblem – display tooltip on first level on Browser-Desktop (Site-Level first).
        THX
        WG

        Reply
  25. Mark Simchock
    Posted on August 4, 2011 at 02:06 Permalink

    I grabbed your plugin for a little project I’m working on. I just wanted to say thanks.

    Reply
  26. Eyal
    Posted on August 2, 2011 at 14:14 Permalink

    Hi Manos,

    Thanks for the cool plugin. I bought you a coffee ;)

    A minor issue I encountered and fixed:
    If you have two elements with tooltip one next to the other, and you hover slowly over one and directly into the other (while the first tooltip is fading-in), the second tooltip won’t show at all.
    Reason: the fade-in callback of the first tooltip kills the second tooltip’s delay timer.
    My fix: clear the timer before the animation:
    function smtTip_fadeIn(){
    clearInterval(smtTip_delay);
    smtTip.fadeTo(“fast”,1);
    }

    Reply
    • malihu
      Posted on August 2, 2011 at 16:16 Permalink

      Awesome! Thanks for the coffee and posting the fix :)

      Edit: Plugin updated (8/7/2011)

      Reply
  27. Bela
    Posted on June 27, 2011 at 20:52 Permalink

    I had a problem with the faded out(opacity at 0) tooltip covering up form fields so the user couldn’t click in them.
    I changed your script around line 61 to the following to solve my problem
    smtTip.fadeTo(“fast”, 0, function () {
    smtTip.hide();
    });

    Reply
    • malihu
      Posted on June 28, 2011 at 20:40 Permalink

      Cool :)
      Thanks a lot for taking the time post this!

      Reply
  28. adasdas
    Posted on May 6, 2011 at 17:22 Permalink
  29. Levi Szekeres
    Posted on March 17, 2011 at 11:41 Permalink

    Hi,
    very fine work, I tried it, but I have a small problem. When I make the font size of the tooltip bigger, on bottom links the tooltip won’t show up, it gets in the way of the mouse. If I’m the only one with this problem, just ignore it, it’s not that important.
    I love your gallery scripts a lot.

    Thank You,
    Levi

    Reply
  30. Sanderling
    Posted on February 20, 2011 at 08:57 Permalink

    Thank you, I would appreciate the help!

    No, it isn’t ajax. It isn’t online, so I can’t give you a link, but I did set up a little example of the problem and can send you the zip file, if that’s okay with you. (Just respond to my email and tell me where to send the file.)

    I thought the culprit was the scrolling div, but in reproducing the problem I now realize that the real culprit is probably the image map! (I forgot to tell you that the tooltips within the scrolling div were attached to an image map.)

    I left the scrolling div in there, but if you peel off that tag you can see that the problem still occurs in IE—so it must be the map.

    Reply
  31. Sanderling
    Posted on February 19, 2011 at 23:29 Permalink

    Important detail!

    The content where this is happening is within a scrolling div (ie, with a fixed height and overflow set to auto, producing a scrollbar).

    I just tried the tooltips in an area of the page OUTSIDE of that scrolling div, and it worked as advertised.

    Is there any way to make this work inside my scrolling div??

    Reply
    • malihu
      Posted on February 20, 2011 at 04:20 Permalink

      Does the content load dynamically (e.g. via ajax)? Can you provide a link to see if I can help?

      Reply
  32. Sanderling
    Posted on February 19, 2011 at 23:19 Permalink

    Hello,

    I love these tooltips and want to use them, but I’m having a problem. On IE, both the native tooltip and the re-styled tooltip appear simultaneously. Do you know what could be causing this?

    The browser version is IE8.

    I varied from your instructions in one detail. I removed the line that calls jquery.min.js, because I already had 1.5 included on my site. To see if that was somehow the problem, I reverted to your precise instructions, but it didn’t make a difference.

    Any ideas?? I WANT TO USE THESE TOOLTIPS!!!

    Reply
  33. Brett Widmann
    Posted on January 29, 2011 at 02:37 Permalink

    I love this plugin!!! Thank you so much for the code.

    Reply
  34. asaf
    Posted on January 27, 2011 at 13:59 Permalink

    hi!
    About the problem that Mirrorshade raised:
    instead of to change the tooltip position from fixed to absolute you also can to change the following lines:
    smtMouseCoordsX= e.pageX;
    smtMouseCoordsY= e.pageY;
    (in the smtMouseMove() function that in the .js file)
    to:
    smtMouseCoordsX = e.clientX;
    smtMouseCoordsY = e.clientY;

    it is because of the “clientX” is relative to the window (and the “pageX” is relative to the document), and so- in page with a scrollbar- the tolltip position is correct.

    Reply
    • malihu
      Posted on January 27, 2011 at 14:43 Permalink

      Great!
      Thanks a lot for taking the time to post in detail an alternative solution.

      Reply
  35. Mirrorshade
    Posted on January 20, 2011 at 16:19 Permalink

    If using this script on pages with a scrollbar. The tooltip will not appear.
    This is because the position of the tooltip is set fixed.
    position:fixed;
    I changed this to:
    position:absolute;
    It works fine for me now. Tested IE8 and FF 3.6.13 and Safari 5.0.3

    Keep up the great work!

    Reply
    • malihu
      Posted on January 20, 2011 at 16:54 Permalink

      You’re absolutely right. Thank you so much for posting this! I thought I had updated the script and post but I completely forgot about it. I just updated the plugin. Thanks a lot :)

      Reply
  36. Paul
    Posted on January 11, 2011 at 01:16 Permalink

    If I use this tooltip together with colorbox, the title is not displayed in the colorobox-lightbox.
    I think there must be some code to release the title on image click.
    Can you help please.

    Reply
    • malihu
      Posted on January 20, 2011 at 16:56 Permalink

      Hi Paul. This happens cause custom tooltips remove the title attribute (so native browser tooltips are disabled). I’ll check the script asap to see what can be done.

      Reply
    • malihu
      Posted on February 9, 2011 at 17:23 Permalink

      Hi again Paul,
      I’ve updated the script to add back the title attribute on click. Post, demo and download archive are updated ;)

      Reply
      • Paul
        Posted on February 19, 2011 at 00:05 Permalink

        Hi Malihu,
        New version works great.
        Thanks!
        Paul

        Reply
  37. Budownictwo
    Posted on January 8, 2011 at 01:38 Permalink

    Very nice tutorial :)

    Reply
  38. Jenny
    Posted on December 27, 2010 at 20:30 Permalink

    This is working great for me, except I would like the tooltip to show up in a fixed position relative to the thing I am hovering over – i.e., not dependent on where my cursor is. So it should always perhaps show up centered and immediately above the photo I am mousing over. I am not sure how to edit the js or the css to make this happen instead of the current functionality. Any ideas?

    Reply
    • malihu
      Posted on December 27, 2010 at 20:44 Permalink

      Hello Jenny,

      Unfortunately it’s not easy to modify this script to work the way you describe, as this plugin is based entirely on the functionality of native browser tooltips. If I get some time I might develop such a tooltip and let you know.

      Reply
  39. El
    Posted on December 13, 2010 at 12:33 Permalink

    Great.
    Simple and useful

    Reply
  40. Esteban Suarez
    Posted on November 27, 2010 at 21:54 Permalink

    Very nice!

    Reply
  41. Jim
    Posted on November 12, 2010 at 23:31 Permalink

    That was supposed to say:

    Does this plugin work if I’m including jquery.js and your plugin js file before the end BODY tag rather than in the HEAD section?

    Reply
  42. Jim
    Posted on November 12, 2010 at 23:29 Permalink

    Does this plugin work if I’m including jquery.js and your plugin js file before the end tag rather than in the section?

    Reply
  43. gabriel
    Posted on November 5, 2010 at 18:37 Permalink

    gracias

    Reply
    • Jen
      Posted on November 10, 2010 at 01:57 Permalink

      I am getting a message that I have a syntax error with the following line of code:

      05 $().ready(function() {

      I am not sure why it ads numbers to my code, but it does.

      I am kind of new to this so please be kind. I put both .js file and .css file in my main directory. Then I copied the code and put inside the head tag. Does it need to go somewhere specific in the head tag? I don’t understand why this is not working. Thank you

      Reply
      • malihu
        Posted on November 10, 2010 at 09:59 Permalink

        Is this line number? Can you post a link to your code so I can check it?

        Reply
      • Kristoffer
        Posted on November 12, 2010 at 14:10 Permalink

        You have copied the code from this page, therefor got line numbers in your code. Remove all line numbers from your code or download the files instead of copying the code.

        Reply
  44. Berik
    Posted on November 1, 2010 at 08:45 Permalink

    So Interesting article.

    Reply
    • Eyal
      Posted on August 2, 2011 at 14:09 Permalink

      Hi Manos,

      Thanks for the cool plugin. I bought you a coffee ;)

      A minor issue I encountered and fixed:
      If you have two elements with tooltip one next to the other, and you hover slowly over one and directly into the other (while the first tooltip is fading-in), the second tooltip won’t show at all.
      Reason: the fade-in callback of the first tooltip kills the second tooltip’s delay timer.
      My fix: clear the timer before the animation:
      function smtTip_fadeIn(){
      clearInterval(smtTip_delay);
      smtTip.fadeTo(“fast”,1);
      }

      Reply
  45. avery
    Posted on October 22, 2010 at 21:06 Permalink

    hi, i like this, but i am wondering if i can put link inside the box and make it stay a while so the content in the box can be copied, and most importantly, is it cross browser?

    thanks

    Reply
    • malihu
      Posted on October 24, 2010 at 04:26 Permalink

      As it is, you cannot put anchor tags inside it, cause the tooltip simply displays the title attribute of an element. I’ve check the script on Opera, Chrome, Safari, Firefox and IE and works as expected, so it is cross-browser.

      Reply
  46. Kian Ann
    Posted on October 11, 2010 at 03:43 Permalink

    Nice and simple addon to really improve the usability of websites!

    Reply
  47. galeazzo
    Posted on October 5, 2010 at 18:36 Permalink

    Thanks a lot . Great job as usual.
    Greeting from France

    Reply
  48. Manos
    Posted on October 5, 2010 at 15:22 Permalink

    Bravo Mano! poly kalh doulia.. well done!

    Reply
    • malihu
      Posted on October 5, 2010 at 15:38 Permalink

      Thank you all! Euxaristw Mano :)

      Reply
  49. Javier
    Posted on October 2, 2010 at 18:09 Permalink

    Thanks! for the tool-tip
    I tropicalized

    greetings from Perú

    Reply
  50. fukid
    Posted on September 30, 2010 at 14:16 Permalink

    thanks! simple and nice!

    Reply


Post a comment

Your e-mail is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
You can write or copy/paste code directly in your comment using the <code> tag:
<code>code here...</code>