In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to show show () hide hide () and switch toggle () in JQuery. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Many animation effects are encapsulated in JQuery
1. Show ()
Show ([speed], [easing], [fn])
1) parameters can be omitted and directly displayed without animation.
2) speed: a string of one of the three predefined speeds ("show", "normal", or "fast") or a millisecond value representing the duration of the animation (for example, 1000).
3) easing: (Optional) is used to specify the switching effect. By default, swing can use the parameter linear.
4) fn: callback function, which runs after the animation is executed, and each element executes once.
2. Hide ()
Hide ([speed], [easing], [fn])
5) parameters can be omitted and directly displayed without animation.
6) speed: a string of one of the three predefined speeds ("show", "normal", or "fast") or a millisecond value representing the duration of the animation (for example, 1000).
7) easing: (Optional) is used to specify the switching effect. By default, swing can use the parameter linear.
8) fn: callback function, which runs after the animation is executed, once for each element.
3. Toggle ()
Toggle ([speed], [easing], [fn])
9) parameters can be omitted and directly displayed without animation.
10) speed: a string of one of the three predefined speeds ("show", "normal", or "fast") or a millisecond value representing the duration of the animation (for example, 1000).
11) easing: (Optional) is used to specify the switching effect. By default, swing can use the parameter linear.
12) fn: callback function, which runs after the animation is executed, once for each element.
Div {width: 300px; height: 200px; background-color: pink } Show hidden toggle $(function () {$("button") .eq (0) .click (function ()) { ("div") .show (1000) ); $("button") .eq (1) .click (function () {$("div"). Hide (1000 alert function () {alert (1);}) ); $("button") .eq (2) .click (function () {$("div"). Toggle (1000);}) Thank you for reading! On "JQuery shows show () hide hide () switch toggle () how to use this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.