jQuery Scroll Fixing Plugin fixedScroll.js (Original)
Add-ons

Plugin Description: The fixedScroll.js webpage scroll-fixing plugin covers most common webpage fixed-positioning requirements.
Usage instructions
1. Include the required files: jQuery and fixedScroll.js.
1 2 | <script src="fixedScroll.js"></script> |
2. Basic Usage
1 | $(".box").fixedScroll() |
3. Parameters
navEls: Class name of the navigation elements; hookEls: Elements to scroll to when the corresponding navigation item is clicked
hookOffset: Top offset of the scroll target elements
offset: Top offset of the fixed element
stickEndEl: Element marking the end position of the fixed element
callback(isFixed): Triggered during scrolling. A return value of isFixed = true indicates that the element is fixed; false indicates that it is not fixed.
4. Methods
1 | resizeHeight(): // Recalculate when the height changes |
评论