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

Introduction to basic operations to achieve animation effects in jQuery_jquery

WBOY
Release: 2016-05-16 17:36:42
Original
889 people have browsed it

Animation effect

show(): show

hide() hides

$().toggle(): Show and hide effect switching

You can pass in parameters, speed.

fadeOut(fade out)

fadeIn(fade in)

fadeToggle(); Fade in and out switching

fadeTo(2000,0.3) displays the image to a transparency of 30%

Sliding display

slideDown():

slideUp():

slideToggle():

You can pass in a speed parameter.

$(':animated'); Gets the element that is being animated.

Stop an animated element:

$(':animated').stop(): Stop the current animation.

stop(true) means to clear all animations in the queue, that is, the animation will stop immediately. If no parameters are passed, the current animation will be stopped immediately.

$(':animated').stop(false,true) The second parameter is true to stop the currently executing animation and set the element to the position where the current animation execution ends.

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!