jQuery Effect fadeTo () Method

Last Updated Jul 11, 2015, 02:05:15 PM

jQuery Effect fadeTo () Method

jQuery fadeTo() method allows us to fade a selected element to a given opacity. Opacity value starts from 0 to 1.


The jquery fadeTo() method animates the opacity of the selected elements. Duration is the parameter to delay method which is in milliseconds. Duration can be used like higher values indicate slower animations. The strings 'fast' and 'slow' can be supplied as parameters to indicate durations of 200 and 600 milliseconds, respectively. The default duration is 400 milliseconds.

The following example illustrates usage of fadeTo(). In this example the p element will be fade to 0.33 by simply calling $( "this" ).fadeTo( "slow", 0.33 ) where slow is duration string.


Try It Now

Other Advanced jQuery Effects you might want to learn
jQuery Effects

jQuery Basic Effects

jQuery Fading Effects

jQuery Sliding Effects

jQuery Custom Effects

Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 11, 2015, 02:05:15 PM