Javascript-wordpress when the side navigation bar is not high enough, how does scrolling with the page be implemented?

Source: Internet
Author: User
When the height is sufficient, the side navigation is fixed, the content does not scroll with the scroll bar, if the page height is not enough to display all the navigation bar content, the navigation bar scrolls along with the page, how is this effect implemented?

Reply content:

When the height is sufficient, the side navigation is fixed, the content does not scroll with the scroll bar, if the page height is not enough to display all the navigation bar content, the navigation bar scrolls along with the page, how is this effect implemented?

Look at the source code to understand ...
The Pinmenu function of Wp-adminjscommon.js

I have not seen the implementation of WP, but my idea is that the sidebar div is the entire big container wrapped up, and then the side bar set relative positioning, left and top are 0.

  • 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.