.fadeIn() and .FadeOut() VS .animate({opacity: '0'}) and .animate({opacity: '1'})?

I’ve noticed some people use .fadeIn() and .FadeOut() and then I noticed some using .animate({opacity: ‘0’}) and .animate({opacity: ‘1’}) … is there a difference or a reason to pick one over the other?

There really is no signficant different between them, other than how the code is presented.

The jQuery code for fadeIn and fadeOut is:


fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },

is there ever a time to use 1 over the other?

Normally you would use fadeIn and fadeOut.
You would use the more explicit numeric version if you are using a variable to customize the level of opacity of an object.

ok thank u !