JQuery Effect – Swipe

Source: Internet
Author: User

The JQuery swipe method allows elements to slide up and down.

Click here to hide/show the panel

Time is money, therefore, we provide you with quick and easy to understand learning content.

Here, you can get any knowledge you need in an easy-to-understand and convenient mode.

Instance

JQuery Slidedown ()
Demonstrates the JQuery Slidedown () method.

JQuery Slideup ()
Demonstrates the JQuery Slideup () method.

JQuery Slidetoggle ()
Demonstrates the JQuery Slidetoggle () method.

JQuery Sliding method

With JQuery, you can create slide effects on elements.

JQuery has the following sliding methods:

    • Slidedown ()
    • Slideup ()
    • Slidetoggle ()
JQuery Slidedown () method

The JQuery Slidedown () method is used to slide the element down.

Grammar:

$( selector). Slidedown ( Speed,callback);

The optional speed parameter specifies the length of the effect. It can take the following values: "Slow", "fast", or milliseconds.

The optional callback parameter is the name of the function that is executed after the slide is completed.

The following example demonstrates the Slidedown () method:

Instance $ ("#flip"). Click (function () {
$ ("#panel"). Slidedown ();
});
Try it?

JQuery Slideup () method

The JQuery Slideup () method is used to slide the element up.

Grammar:

$( selector). Slideup ( Speed,callback);

The optional speed parameter specifies the length of the effect. It can take the following values: "Slow", "fast", or milliseconds.

The optional callback parameter is the name of the function that is executed after the slide is completed.

The following example demonstrates the Slideup () method:

Instance $ ("#flip"). Click (function () {
$ ("#panel"). Slideup ();
});
Try it?

JQuery Slidetoggle () method

The JQuery Slidetoggle () method can be toggled between the Slidedown () and the Slideup () method.

If the elements slide down, slidetoggle () can slide them up.

If the elements slide up, slidetoggle () can slide them down.

$( selector). Slidetoggle ( Speed,callback);

The optional speed parameter specifies the length of the effect. It can take the following values: "Slow", "fast", or milliseconds.

The optional callback parameter is the name of the function that is executed after the slide is completed.

The following example demonstrates the Slidetoggle () method:

Instance $ ("#flip"). Click (function () {
$ ("#panel"). Slidetoggle ();
});
Try it?

JQuery Effect – Swipe

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.