0 votes
in JQuery by
What is the purpose of the fade toggle() method in JQuery?

1 Answer

0 votes
by
It is used to toggle between the fadeIn() and fadeOut() functions. Here is an example to show the same:

<div id="div1" style="color:orange;”>My text</div>

<button>fade in/out</button><br><br>

<script>

$("button").click(function(){

$("#div1").fadeToggle();

}

</script>
...