Fixed navigation when jQuery. Pin is used for vertical scrolling. jquery. pin navigation

Source: Internet
Author: User

Fixed navigation when jQuery. Pin is used for vertical scrolling. jquery. pin navigation

ZKEACMS navigation cannot be fixed by default, and the page is scrolled. To have a better user experience, you can pin the navigation to the top when the page is scrolling down, this makes it easy for users to click.

JQuery Pin

With jQuery's plug-in jQuery. Pin, this plug-in can be used to fix the elements in the page.

Http://webpop.github.io/jquery.pin/

Add script

Add a script to the page and use jquery. pin to fix the navigation. To reduce the number of times a script is added, you can add the script to the layout so that all the pages that use this department will be applied.

1. layout component-> default Layout-> Add the script to the bottom of the page at the bottom.

2. Select the script component and click Next.

3. Enter the following script content to save

<Script type = "text/javascript" src = "http://cdn.zkea.net/Scripts/jquery.pin.min.js"> </script> <script type = "text/javascript"> $ (function () {$ (". navigation "). closest (". widget "Maid (" z-index ", 10000 ). pin () ;}) </script>

In this way, you can preview the effect on the corresponding page.

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Related Article

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.