jQuery fadeOut | Using fadeOut() method of jquery with example code

jQuery fadeOut() method

jQuery fadeOut() method fades out the visible elements of website, for example <div> or <p> etc. that may contain text, images or other content. It slowly changes the opacity of given element from visible to hidden.

Syntax of fadeOut()



Selector = can be an element like div, p, etc.

Speed = Optional parameter that specifies the fadeOut speed with possible values of

  •  “slow”
  • “fast”
  •  Or value in milliseconds

Callback = after fadeOut() method is completed, an optional callback function to perform certain action can be given.

Running example of fadeOut() jQuery method

In this example, as you click “FadeOut method jquery” button it will hide three visible blocks with fast, slow and 3000 milliseconds speed.

jQuery fadeOut

Experience this example online

Also see jQuery fadeIn() method | jQuery fadeToggle method

Was this article helpful?

Related Articles

Leave A Comment?