Skip to content

Commit a76a76c

Browse files
authored
Merge pull request #138 from erthalion/feature/popup-class
Set popupClass before tooltip positioning
2 parents a97b8db + 296b821 commit a76a76c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tooltipcontroller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ function TooltipController(options) {
105105

106106
tipElement.data(DATA_MOUSEONTOTIP, options.mouseOnToPopup);
107107

108+
// add custom class to tooltip element
109+
tipElement.addClass(options.popupClass);
110+
108111
// set tooltip position
109112
if (!options.followMouse) {
110113
positionTipOnElement(element);
@@ -113,9 +116,6 @@ function TooltipController(options) {
113116
positionTipOnCursor();
114117
}
115118

116-
// add custom class to tooltip element
117-
tipElement.addClass(options.popupClass);
118-
119119
// close tooltip when clicking anywhere on the page, with the exception
120120
// of the tooltip's trigger element and any elements that are within a
121121
// tooltip that has 'mouseOnToPopup' option enabled

0 commit comments

Comments
 (0)