jQuery Tutorial


jQuery Example


jQuery References


jQuery fadeTo() Effect Reference


  All jQuery Effect References


Uses

fadeTo() effect allow to set Opacity for selected element from visible to hidden in opacity value wise.


Syntax

$(selector).fadeTo(speed,opacity,[callback])

jQuery fadeTo() effect supported following parameters.

ParameterDescription
speed speed is Required parameter. speed define the fading effect speed.
Specific Speed Values:
  • "slow"
  • "normal"
  • "fast"
  • "1000" (milliseconds)
opacity opacity is Required parameter. set the specific opacity between 0.00 to 1.00
callback Callback is optional parameter. It is use to represents a function to be executed whenever effect is completed.

jQuery fadeTo() effect Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("button").click(function(){
    $("div").fadeTo("slow",0.20);
  });
});
<script>
Online Try This Code Your Self....   »

  All jQuery Effect References