#8828 closed bug (duplicate)
FadeOut FadeIn broken
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This code may broke the fadeIn / fadeOut : Html : <div id="one_div">Content...</div>
JQuery Code : $('#one_div').fadeOut('slow',function(){
$(this).fadeIn('slow');
});
Sometime the content stay hidden, even if I invoke this jQuery code again. The bug happens randomly (tested on CR10, FF4, IE9). On Firebug (FF4, firebug 1.7), if the animation succeed I have this in the html panel : <div id="one_div" style="display:block;">Content</div>
If it fail I have this : <div id="one_div" style="display:block;opacity:0;">Content</div> And the content stay hidden.
A "hack can fix this bug" :
$('#devis-c').attr('style',).fadeOut('slow',function(){
$(this).attr('style','display:none').fadeIn('slow');
});
I's a totaly ramdom bug, with a probability of 10% on my website.
This bug is similar to the old closed bug in this ticket : http://bugs.jquery.com/ticket/1052
Change History (11)
comment:1 Changed 11 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
Status: | pending → new |
---|
You can test the bug on this website : http://lamaisonduweb2.webgestion.fr Just navigate with the top menu, sometime the box "BESOIN D'UN DEVIS?" on the left stay hidden. line 402 on mdw.js in the source code.
comment:3 Changed 11 years ago by
Status: | new → pending |
---|
It's difficult to navigate through that much code to narrow down the issue. Please provide a reduced test case so that we can confirm it is an issue with jQuery.
comment:4 Changed 11 years ago by
you should to call a .stop() at the beginning of your animated functions to prevent them from stepping on one another. adding one before the .hide() on 403 seemed to prevent the bug in my (admittedly hasty) testing.
comment:5 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
I believe this is operator error. Please ask for support in the #jquery irc channel or at http://forum.jquery.com/using-jquery. We can reopen if this is an issue with jQuery.
comment:6 Changed 11 years ago by
Just tell my why this code is bugged: function test() { alert('start'); $('#devis-c').fadeOut('slow',function(){
$(this).fadeIn('slow',function(){
alert('callback');
});
}); }
Sometimes all alerts are ok, sometime, only the start alert and the devis-c stay hidden even if I execute the function again, the callback is not triggered.
comment:7 Changed 11 years ago by
Edit : the hack dont really work... Can't fix the bug. The final state if it's ok should be like here : http://jsfiddle.net/WMy3B/3/
<div id="devis-c" style="display: block;">
On my website it's sometimes : <div id="devis-c" style="display: block;opacity:0"> fadeOut bug maybe.
comment:8 Changed 11 years ago by
Component: | unfiled → effects |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
A test case was provided. Looks like stop is somehow interfering with the fadeIn. http://jsfiddle.net/timmywil/WMy3B/10/
comment:9 Changed 11 years ago by
Status: | reopened → open |
---|
comment:10 Changed 11 years ago by
Priority: | undecided → low |
---|---|
Resolution: | → duplicate |
Status: | open → closed |
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket! Additionally, test against the
jQuery (edge)
version to ensure the issue still exists.