Skip to content

Commit b4c8370

Browse files
committed
Cleaned up the fx queue process.
1 parent fa13d28 commit b4c8370

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jquery.powertip.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@
152152
if (totalDifference < options.intentSensitivity) {
153153
element.data('hasActiveHover', true);
154154
// show popup, asap
155-
tipElement.queue(function() {
155+
tipElement.queue(function(next) {
156156
showTip(element);
157+
next();
157158
});
158159
} else {
159160
// try again
@@ -172,8 +173,9 @@
172173
// if the popup is open and we got asked to open another one then
173174
// the old one is still in its fadeOut cycle, so wait and try again
174175
if (session.isPopOpen) {
175-
tipElement.queue(function() {
176+
tipElement.delay(100).queue(function(next) {
176177
showTip(element);
178+
next();
177179
});
178180
return;
179181
}
@@ -209,7 +211,7 @@
209211
tipElement.data('mouseOnToPopup', options.mouseOnToPopup);
210212

211213
// fadein
212-
tipElement.stop(true, true).fadeIn(options.fadeInTime, function() {
214+
tipElement.fadeIn(options.fadeInTime, function() {
213215
// start desync polling
214216
if (!session.desyncTimeout) {
215217
session.desyncTimeout = setInterval(closeDesyncedTip, 500);
@@ -224,7 +226,7 @@
224226
*/
225227
function hideTip(element) {
226228
element.data('hasActiveHover', false);
227-
tipElement.stop(true, true).fadeOut(options.fadeOutTime, function() {
229+
tipElement.fadeOut(options.fadeOutTime, function() {
228230
session.activeHover = null;
229231
session.isPopOpen = false;
230232
session.isFixedPopOpen = false;

0 commit comments

Comments
 (0)