Trusted answers to developer questions

What is the jQuery hide() method?

Get Started With Data Science

Learn the fundamentals of Data Science with this free course. Future-proof your career by adding Data Science skills to your toolkit — or prepare to land a job in AI, Machine Learning, or Data Analysis.

The jQuery hide() method is used to hide ​selected HTML elements from the display. It takes in three arguments:

  • speed: how long it will take to hide the specified element.
  • easing: the easing function for the transition.
  • complete: the function to call after the animation is completed.

The following illustration goes over the syntax:

svg viewer

Code

The following code snippet shows how to use the hide() method. When the “show less” button is clicked, details about jQuery will be hidden:​

Console

RELATED TAGS

jquery
javascript
hide
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?