ExampleGradually change the opacity of a p element:
Try it yourself » |
The fadeTo() method gradually changes the opacity, for selected elements, to a specified opacity (fading effect).
$(selector).fadeTo(speed,opacity,callback) |
Parameter | Description |
---|---|
speed | Required. Specifies the speed of the fading effect. Possible values:
|
opacity | Required. Specifies the opacity to fade to. Must be a number between 0.00 and 1.00 |
callback | Optional. A function to be executed after the
fadeTo() method is completed.
To learn more about callback, visit our jQuery Callback chapter. |