Home > Web Front-end > JS Tutorial > body text

There are several effects of JQuery Show(). There is always one you need.

巴扎黑
Release: 2017-06-29 10:42:51
Original
1240 people have browsed it

1 show() method and hide() method


$("selector"). show()
Restore the element's default or set display attribute from display:none
$("selector").hide()
Set the display style of the element to none, which is equal to $("selector").css("display","none")
(Note: After passing in the parameters, .show() and .hide The () method animation changes the width, height and transparent properties of the element at the same time; the passed-in parameter controls the display and hide speed, in milliseconds, such as .show(600), you can also pass in fast , normal, slow, fast is 200 milliseconds, normal is 400 milliseconds, slow is 600 milliseconds)


2 fadeIn() method and fadeOut() method


$("selector").fadeIn()
Control the transparency to increase from display:none to fully displayed within the specified time
$ ("selector").fadeOut()
Controls the transparency to be reduced to display:none within the specified time;


##3 slideUp() method and slideDown( )Method


$("selector").slideUp() Controls the height of the element to shorten from bottom to top to display within the specified time :none;

$("selector").slideDown() Control the height of the element to extend from display:none to the full height within the specified time


4 Custom animation method animate()

##$("selector").animate(params,speed,callback);
params: a mapping containing style attributes and values, such as {property1: "value1", property2: "value2",...} speed: speed parameter, optional
callback: when the animation is completed Parameters to be executed when executed (i.e.
Callback function
), optional

The above is the detailed content of There are several effects of JQuery Show(). There is always one you need.. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!