jquery's scrollify plugin implementation slides to the next node of the page _jquery

Source: Internet
Author: User

Sometimes we need to do a single page to introduce product features, and a single page content is very much and the page is very long, in order to quickly locate the product feature node, we use JS to listen for user wheel events, when the user triggers the wheel slide or use gesture touch screen slide, you can locate the corresponding node. A jquery plugin called scrollify to help us do it.

Scrollify need to be implemented with jquery 1.6+ and buffer animation easing plug-ins. The HTML basic structure is as follows:

<! DOCTYPE html> 
 
 

The following is the default option configuration for scrollify:

$.scrollify ({section 
    : "sectionname", " 
    section-name", 
    easing: "Easeoutexpo", 
    scrollspeed : 1100, 
    offset:0, 
    scrollbars:true, 
    before:function () {}, 
    after:function () {} 
}); 

Option Description:

Section: Node part selector.
SectionName: Each section node corresponds to the Data property.
Easing: Defines a buffered animation.
Offset: Defines the offsets for each color tion node.
ScrollBars: scroll bar is displayed.
Before: callback function, triggered before scrolling starts.
After: callback function, triggered after scrolling completes.

Scrollify also provides a method call, such as:

$.scrollify ("Move", "#name"); 

The above code can be scrolled directly to the #name node.

The above mentioned is the entire content of this article, I hope you can enjoy.

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.