Adding animations and different effects play an important role in increasing the user experience of a website. These can be performed with absolute ease using various methods provided by jQuery, which is a JavaScript library. There is a huge list of such jQuery methods, however, in this guide we will learn all about the jQuery show() method.

Let’s get started.

jQuery show() Method

As the name suggests, the jQuery show() method is used for the purpose of showing the hidden elements. This property shows only those elements that are hidden using either jQuery hide() method, or the CSS display property.

Syntax

$selector.show(parameter)

The show() method exhibits the following parameters.

Parameter Description
speed This parameter describes the speed of the show effects. It renders values such as slow, fast, and milliseconds.
easing This parameter describes the speed of an element at different animation points. It renders values such as swing, and linear.
callback It is a function that executes once the show() method is called.

Note: All of the above-mentioned parameters are optional.

The examples below will aid you in establishing a better understanding of the show() method.

Example 1

In this example we have demonstrated the show() method by passing no parameter.

Since the show() method reveals only those elements that are hidden using jQuery hide() method, therefore, we have to first hide an element in order to show it using the show() method.

HTML

In the above HTML code two

About the author

<img data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2022/03/echo/B49B6FDCE1F74B3598C4C9BF564AEBEC-150×150.jpg621ecdd1892d1.jpg" height="112" src="data:image/svg xml,” width=”112″>

Naima Aftab

I am a software engineering professional with a profound interest in writing. I am pursuing technical writing as my full-time career and sharing my knowledge through my words.