Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the concept of show in jquery

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report