Need to close tooltip if user clicks element again when tooltip is already open

NathanielD's Avatar


30 Sep, 2010 08:00 PM

I am using an image as my trigger for TipTip, and the tooltip is triggered by being clicked on. However, if you click the image when the tooltip is already visible, it just keeps fading in again. I want it to fadeout if the user clicks on the image when the tooltip is already open. Can anyone help? Would be very much appreciated.

I have been able to add a close button inside of the tooltip and i can get the tooltip to fade away if the user clicks on that. Once I get this figured out I should be good to go. Love it so far... better than anything else out there I've found.

  1. 1 Posted by NathanielD on 01 Oct, 2010 01:39 PM

    NathanielD's Avatar

    ok, I figured out!

    in jquery.tipTip.minified.js, I added in this code right before "if(timeout)":

    if (document.getElementById('tiptip_holder').style.display == 'block')

    return false;

    i set fadeout to zero, because if you have multiple tooltip triggers, when you try to click another one when one is already open the effect is not good. i am very happy with the way it is working now - love this plugin!!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac