Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the concept of show in jquery

Shulou Source: shulou.com Published: 2022-05-31 22:07:07 10月22日 Update

This article mainly introduces the relevant knowledge of what the concept of show in jquery is, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this article on the concept of show in jquery. Let's take a look at it.

In jquery, show is an effect method that shows hidden selected elements; you can set the speed at which elements are displayed in parameters, specify the speed of elements at different points in the animation, and the functions that need to be executed after the method is executed, with the syntax "element object .show (speed,easing,callback)".

The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.

What is show in jquery

The show () method shows hidden selected elements.

Note: show () applies to elements hidden through the jQuery method and display:none in CSS (not to elements hidden through visibility:hidden).

Show hidden matching elements. This method is generally used to pop up the form. Eg: click the registration button to pop up the registration page.

This is the unanimated version of show (speed, [callback]). If the selected element is visible, this method will not change anything. Whether this element is hidden by the hide () method or if display:none;, is set in CSS, this method will work.

Grammar

$(selector) .show (speed,easing,callback)

Speed is optional. Specifies the speed at which the effect is displayed.

Possible values:

Millisecond

"slow"

"fast"

Easing is optional. Specifies the speed of the element at different points in the animation. The default is "swing".

Possible values:

"swing"-move slowly at the beginning / end and fast in the middle

"linear"-moving at a uniform speed

Tip: more easing functions are available in the extension.

Callback is optional. The function to be executed after the show () method is executed.

Examples are as follows:

Rookie tutorial (runoob.com) $(document) .ready (function () {$("btn1")) .click (function () {$("p"). Hide ();}); $(".btn2") .click (function () {$("p"). Show ();}); hide display

This is a paragraph.

Output result:

This is the end of the article on "what is the concept of show in jquery?" Thank you for reading! I believe you all have a certain understanding of "what is the concept of show in jquery". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Elements methods concepts speed functions animation knowledge movement different points content effects tutorials more versions articles grammar validity discomfort things Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Redmi Huawei MariaDB vpn