Not sure if I'm explaining this correctly or following the instructions, but if you have more than one element with a tooltip, and use the child selector method, then all of the elements get a tooltip but the content of the tooltip is the content from the tooltip for the very first element. In other words, the selectors are wrong somewhere and are not made to expect that there would be more than one matching element. I'm having a little trouble tracing all the jQuery around since it's like a 20 step process to actually go from the selector (as specified in the settings) to obtaining the content from the child element...
Comment | File | Size | Author |
---|---|---|---|
#17 | tipsy-multiple_tool_tips_and_levels_of_children-1199546-17.patch | 449 bytes | sigveio |
#7 | 1199546_tipsy_multiple-tooltips.patch | 453 bytes | mstrelan |
#6 | tooltip_hack.zip | 896 bytes | alextrejo |
Comments
Comment #1
Michsk CreditAttribution: Michsk commentedYes i can confirm this. Using a class as a selector does not inherit the title from the defined class. For me (D6), it only shows the first tooltip and the other elements don't even show a tooltip.
Comment #2
Michsk CreditAttribution: Michsk commentedThe drupal form elements seem to behave correctly.
//edit: strange there are even more elements that behave as expected. Just when using a view with custom themeing, applying theme(imagecache) to the themeing, and that breaks it.
//edit: lol i forgot to give them a title. So i do not have this issue.
Comment #3
elianmI'm having this issue as well, multiple items with child element ".class" as a selector, get the same tooltip content of the first item.
What do you mean when you say "you forgot to give them a title" ?
Comment #4
Michsk CreditAttribution: Michsk commentedi forgot to give the elements a title....
Comment #5
alextrejo CreditAttribution: alextrejo commentedI was having this issue, plus the tooltip didn't stay open while mouse was inside the tooltip. I solved it by adding a javascript code to the page where I want the tooltip to work.
The code I wrote is for child element selector, not for attribute selector. Feel free to modify the code to work with attribute if you need to. Hope this code helps
Comment #6
alextrejo CreditAttribution: alextrejo commentedSorry, didn't attach the file. Here you are
Comment #7
mstrelan CreditAttribution: mstrelan commentedThis is such a simple fix, just apply the attached patch.
Comment #8
Yurii CreditAttribution: Yurii commentedPatch #7 working for me. Thanks.
Comment #9
Vote_Sizing_Steve CreditAttribution: Vote_Sizing_Steve commentedPatch #7 works to show the right data, but the module I had my developer write #5 & 6 also had the hovertext stay visible long enough for users to click on links inside it. Any suggestions on how to include that in a patch like #7?
Comment #10
mstrelan CreditAttribution: mstrelan commentedThat's a different issue. I haven't had a good look at what #5 or #6 does, but there is a setting in the Tipsy configuration for delay before disappearing. Set that to 500 or 1000 or something and this might achieve what you want.
Comment #11
Blue CreditAttribution: Blue commentedPatch #7 worked
Comment #12
izus CreditAttribution: izus commentedpatch #7 worked fine for me
thanks mstrelan
Comment #13
boabjohn CreditAttribution: boabjohn commented#7 works for me.
Filing new info on the thread for the MouseIn/Out function to keep the tooltip open...see: http://drupal.org/node/1678254
Comment #14
Dexter0015 CreditAttribution: Dexter0015 commentedThanks for the patch (#7) it works fine !
Comment #15
izus CreditAttribution: izus commentedComment #16
CodigoVision CreditAttribution: CodigoVision commentedJust changing the title back
Comment #17
sigveio CreditAttribution: sigveio commentedI found that the patch in #7 did not work very well in my case, where the child selector were for an element that is a grandchild of the parent.
An example scenario is that you have the main tipsy selector set to ".foo-bar", the tooltip content set to "Child element" and a (child) selector of ".title-element", with the following markup:
The .children() jQuery selector of #7 wouldn't be able to target the .title-element - because .children() only travels a single level down the DOM tree.
I have therefore created a patch using .find() instead - which, unlike .children(), can traverse down multiple levels to select descendant elements (grandchildren, etc) as well.
It seems to work well for the various cases/selectors I have on the project I am working on, but I don't have opportunity to test it very thoroughly. Would appreciate if someone else can give it a test and verify. Thanks!
Comment #18
golddragon007 CreditAttribution: golddragon007 commented#17 works for me, it found the 3rd child
Comment #19
ram4nd CreditAttribution: ram4nd as a volunteer commentedCan you re-roll it against the latest dev? I am not able to find such lines at all.