jQuery Show and Hide Part Deux
Utilizing vanilla show/hide/toggle is a perfectly legitimate way to use said functions but when we start plugging in effects to the .show and .hide events, we really start to see the eye-candy that jQuery can offer. Using the same frame that we did in my last post on jQuery .show and .hide, we’ll add in a bit more code to make this a cooler transition.
The easiest effect to add on is the speed of the function. Once this duration is added, the three methods will animate the the width, height, and opacity simultaneously. Durations can have either the string ‘fast’ and ’slow’, which represent 200 and 600 milliseconds respectively, or one can supply his/her own number. Note that when using a string, one must enclose the value in quotation marks but none for a numerical value.
.show('slow') vs .hide(600)
