jQuery fade toggle


jQuery fade toggle – jQuery fadeto toggle is used to toggle between the fadeIn() and fadeOut().
It chages the state.
– if the elements state is visible it makes them hidden and if element is hidden it will make them visible.


Syntax of jQuery fadeToggle

$(selector).fadeToggle(speed,callback);

Speed Parameter – specifies the speed of the effect.
Speeds available are :
– slow
– fast
– or in miliseconds ex. 600

Callback Parameter- Is function name which is called when transition is complete.

jQuery Fade Toggle Example


<script type="text/javascript">
         $(document).ready(function(){
          $("#fadeInbutton").click(function(){
           $("#demoDiv").fadeToggle();
          });
          });
</script>    

Try it »

jQuery Fade Toggle More Examples

[table width=”100%” colwidth=”20|100|50″ colalign=”left|left|center|left|right”]
No, Fade Toggle Effect ,Syntax, Example & Demo
1,Fade Toggle “slow”, $(selector).fadeToggle(“slow”);,See Detail & Demo »
1,Fade Toggle “fast”,$(selector).fadeToggle(“fast”);,See Detail & Demo »
1,Fade Toggle “miliseconds”,$(selector).fadeToggle(600);,See Detail & Demo »

[/table]


Advertisements

Add Comment

📖 Read More