I’m using this tooltip plugin:
I’m trying to get the clientX of the tooltip area. Meaning, the X position where the client hovered over the element. So far, no luck.
Here’s an example:
$(this).find("div.GanttRange[data-RangeID != '']").tooltip({
bodyHandler: function (e) {
if (!_self.DragInProgress) {
result = window[_self.ElementRangeTooltipFunction](_self.GetRelativeClientX(e.clientX));
} else {
result = "";
}
return result;
},
opacity: 0,
track: true,
showURL: false
});
e is undefined in this context. How do I find it otherwise?
Thanks to the answer in this question I’ve solved this issue by modifying the Tooltip plugin code.
In the
tooltipanonymous function, replace this:with this:
In the
Savefunction, replace this:with this:
and this:
with this: