-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Description
First of all, thanks for a good tooltip library.
I have elements with tooltips that are the children of elements with also tooltips. When you hover the child, both tooltips are shown. I have read issue #638 and #627, but it didn't solve everything. But I almost solved it myself. My code below works except when you leave the child at an edge that is the same edge of the parent. In that case the parent opens when not needed. (Or when you leave out the reopen code, the parent tooltip does not show when hovering back to it.)
Questions:
- Is my code the best approach ?
- How to solve the "common edge" problem?
$('.tooltip')
.tooltipster({
debug:true,
animation: 'grow',
interactive:true,
repositionOnScroll:true,
//trackOrigin:true, //performance!
delay: 200,
delayTouch:200,
contentAsHTML : true
})
//All elements with tooltip that have a parent with a tooltip
.children('.tooltip')
.tooltipster('option' , 'functionBefore' , (inst, helper) => {
$(helper.origin).parents('.tooltip').tooltipster('disable');
})
.tooltipster('option' , 'functionAfter' , (inst, helper) => {
$(helper.origin).parents('.tooltip').tooltipster('enable').tooltipster('open');
})
;
Metadata
Metadata
Assignees
Labels
No labels