When we include a speed (or, more precisely, a duration) with
.hide(), it becomes animated—occurring over a specified period of time. The
.hide('speed') method, for example, decreases an element's height, width, and opacity simultaneously until all three reach zero, at which point the CSS rule
display: none is applied. The
.show('speed') method will increase the element's height from top to bottom, width from left to right, and opacity from 0 to 1 until its contents are completely visible.
With any jQuery effect, we can use one of three preset speeds:
.show('slow') makes the show effect complete in .6 seconds,
in .4 seconds, and
in .2 seconds. ...