$.each([newPanel, prevBtn, nextBtn, infoPanel], function(i, el) { $(el).fadeIn(200); });
update:
And if you want to call the function only once, you can do something like @Guffa by adding elements to the same jQuery collection and only then apply the animation (once):
[newPanel, prevBtn, nextBtn, infoPanel] .reduce(function(el, next) { return el.add(next); }) .fadeIn(200);
gion_13
source share