I have this CSS :
.tracklistOff{display:none;}
.tracklistOn{width:710px; float:left;}
.trackon{width:710px; float:left;}
this HTML :
<div class="tracklistOff">
<div class="trackon">
... somethings...
</div>
</div>
Now, with this code :
$('.tracklistOff').find('.trackon').clone().fadeIn(600).insertAfter('.tracklistOn');
I get the fadeIn() effect (and this for me is strange; trackon hasn’t the display:none; attribute).
With this code :
$('.tracklistOff').find('.trackon').clone().insertAfter('.tracklistOn').fadeIn(600);
the fadeIn() effect is not showed. Why changing position on the same elements fadeIn() works or not?
fadeInis a shortcut toanimate({ opacity: "show" }). In this function there is a condition to check if the current element is visible. If the element is already visible this function does nothing.Therefore the issue in your code is that in the first example
.trackonis not visible whenfadeInis called, instead in the second one.trackonis already visible whenfadeInis called so the function does nothing.