TipTip maxWidth bug
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
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
1 Posted by Josef on 17 Jul, 2012 03:35 PM
@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 Posted by Rob on 02 Aug, 2012 08:04 AM
@Mike
Line 103 of the unminified js
3 Posted by Rob on 02 Aug, 2012 08:05 AM
Sorry, meant @Josef
4 Posted by Matt on 04 Jan, 2013 04:54 PM
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 Posted by Soham on 24 Aug, 2013 08:10 AM
Here's attached the fixed version if anyone wants to download.
It's modified by me & not an official release.
Enjoy!
Soham.
6 Posted by Tommy on 07 Nov, 2013 11:20 AM
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