Skip to main content

Bug Tracker

Side navigation

#6496 closed bug (fixed)

Opened April 27, 2010 09:23PM UTC

Closed April 17, 2011 08:08PM UTC

.fadeIn() breaks when using .dequeue() rapidly

Reported by: rasamassen Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.4.2
Keywords: FadeIn Cc:
Blocked by: Blocking:
Description

Because .fadeIn() ultimately doesn't mess with opacity, if you rapidly use the following, eventually the element's opacity is set to near zero by fadeIn()/fadeOut():

$('.foobar').hover(function()

{

$('.sub').dequeue().stop();

$('.sub').delay(600).fadeTo('400',1);

}, function() {

$('.sub').dequeue().stop();

$('.sub').delay(600).fadeOut('400');

});

From what I understand in the documentation, fadeIn should bring an element to opacity:1. fadeTo can take to variable opacity in between.

Attached is an example that shows fadeIn failing to reach opacity:1 where fadeTo succeeds.

Attachments (1)
  • test.html (2.1 KB) - added by rasamassen April 27, 2010 09:23PM UTC.

    fadeIn test case

Change History (6)

Changed April 27, 2010 09:36PM UTC by rasamassen comment:1

I double checked the definition of fadeIn: Display the matched elements by fading them to opaque. Thus, if opacity of an element called by fadeIn is set, it's opacity should be changed to 1 by the completion of fadeIn. This is not happening.

Changed April 28, 2010 06:24PM UTC by rasamassen comment:2

What may be a simple solution to this is to make fadeIn/fadeOut call fadeTo rather than directly calling animate. fadeTo has been developed to account for many more possibilities.

Changed November 05, 2010 05:37AM UTC by rasamassen comment:3

Working example of break at http://jsfiddle.net/K4FtG/ Break still present in 1.4.4rc2.

Changed November 10, 2010 04:45PM UTC by SlexAxton comment:4

keywords: → FadeIn
milestone: 1.4.31.5
priority: → low
status: newopen

Changed February 03, 2011 12:09AM UTC by rasamassen comment:5

Still broken in 1.5

Changed April 17, 2011 08:08PM UTC by timmywil comment:6

milestone: → 1.next
resolution: → fixed
status: openclosed

This is why we now have .stop(true, true). http://jsfiddle.net/timmywil/K4FtG/4/