[jQuery] There must be a better way to write this
I'm trying to fade an element out, then fade it's next sibling out,
with no predetermined amount of elements. Here is an example of how I
have it now but with only 3 elements:
function fadeEmOut(){
var kid = $('#folio').children();
kid.eq(0).fadeOut(function(){
kid.eq(1).fadeOut(function(){
kid.eq(2).fadeOut();
});
});
}
i KNOW there is a better way to write this, I attempted using the
each() function but it fades every element simultaneously. When
someone writes back with the answer I'm gonna feel like a tard. Thanks!