TipTip maxWidth bug

Michael's Avatar

Michael

08 Mar, 2012 12:31 PM

Hi,

don't know if you are still into bugfixing TipTip, but i found one easy-to-fix. If you make two elements with different class names and different options like so:

jQuery('.tip').tipTip({maxWidth:'300px'});
jQuery('.tipSmall').tipTip({maxWidth:'100px'});

it does not work, because your plugin sets the max-width property of the tiptip_holder once and never changes it. If you remove the max-width in the tiptip_holder HTML and put it into active_tiptip() like so:

tiptip_holder.hide().removeAttr("class").css("margin","0").css('max-width', opts.maxWidth);

it works again.

Cheers,
Michael

  1. 1 Posted by Josef on 17 Jul, 2012 03:35 PM

    Josef's Avatar

    @Michael,

    Since it doesn't look like this bug is being addressed here, can you explain how you "remove the max-width in the tiptip_holder HTML and put it into active_tiptip()" in a little more detail?

    I have this issue, and would like to fix it. Your code seems simple enough, but where does it go? I don't see any reference to active_tiptip() in the single line of code you posted, so is this going into the tiptip.js file? If so, where?

    Thanks,

    Josef

  2. 2 Posted by Rob on 02 Aug, 2012 08:04 AM

    Rob's Avatar

    @Mike

    Line 103 of the unminified js

  3. 3 Posted by Rob on 02 Aug, 2012 08:05 AM

    Rob's Avatar

    Sorry, meant @Josef

  4. 4 Posted by Matt on 04 Jan, 2013 04:54 PM

    Matt's Avatar

    Thanks for the fix. I ran into the same problem. I modified the v1.3 tiptip code. Doesn't seem like a new version was ever released.

  5. 5 Posted by Soham on 24 Aug, 2013 08:10 AM

    Soham's Avatar

    Here's attached the fixed version if anyone wants to download.

    It's modified by me & not an official release.

    Enjoy!

    Soham.

  6. 6 Posted by Tommy on 07 Nov, 2013 11:20 AM

    Tommy's Avatar

    Hello i have the same problem, and Soham, i tried with your link and put it instead of the old one, i have 2 tiptips, one long and one short. When i load my page the long looks normal, but if i hover the short one then the long one i dont get right "width" and the maxWidth isn't working :S

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

Recent Discussions

08 Feb, 2017 08:05 AM
08 Feb, 2017 08:02 AM
08 Feb, 2017 07:56 AM
08 Feb, 2017 07:53 AM
08 Feb, 2017 07:45 AM