Fix for reinitialising of tiptip

Brinley Ang's Avatar

Brinley Ang

01 May, 2012 04:42 AM

It appears that when a tiptip is initialised, the title attribute is removed and your check of org_elem.attr(opts.attribute) would return null instead of an empty string.

The following fix should resolve this

Index: jquery.tipTip.js

--- jquery.tipTip.js (revision 630) +++ jquery.tipTip.js (working copy) @@ -56,7 +56,7 @@

        } else {
            var org_title = org_elem.attr(opts.attribute);
        }
  •     if(org_title != ""){
    
  •     if(!org_title || org_title != ""){
            if(!opts.content){
                org_elem.removeAttr(opts.attribute); //remove original Attribute
            }
    
  1. 1 Posted by Brinley Ang on 02 May, 2012 03:45 AM

    Brinley Ang's Avatar

    Actually it should be

    if(org_title && org_title != "")

    Otherwise empty title tags get an empty tooltip

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

Generic

? 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