How to make elements slide up and disappear in jquery

青灯夜游
Release: 2022-04-27 19:28:23
Original
2141 people have browsed it

Method: 1. Use slideUp(), the syntax "$("element").slideUp(milliseconds)" will hide the selected element in a sliding manner; 2. Use slideToggle(), the syntax "$( "Element").slideToggle(milliseconds)", when the element is in the display state, the element will be hidden in a sliding manner.

How to make elements slide up and disappear in jquery

The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.

jquery method to realize the element sliding up and disappearing

1. Use slideUp()

The slideUp() method hides the selected elements in a sliding manner.

Note: Hidden elements will not be fully displayed (no longer affect the layout of the page).

      

这是一个段落。

Copy after login

How to make elements slide up and disappear in jquery

2. Use slideToggle()

slideToggle() will check the visible state of the selected element. If an element is If an element is visible, the element will be hidden by sliding up; if an element is hidden, the element will be displayed by sliding down.

      

这是一个段落。

Copy after login

How to make elements slide up and disappear in jquery

[Recommended learning:jQuery video tutorial,web front-end video

The above is the detailed content of How to make elements slide up and disappear in jquery. 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 Recommendations
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!