Anchors, with support for extending many features
Add-ons

Plugin description: Anchor positioning with simple code implementation and no dependencies on other plugins.
1 2 3 4 5 6 7 8 9 10 11 | let newanchor = new anchor({ itemPiece: itemPiece, // All sections, including the header, used to obtain their heights itemHeader: itemHeader, // Header of each section flexItem: flexItem // Anchor section used to obtain its height});// Triggered when an anchor is clickednewanchor.toheight(index)// Listen for scroll eventswindow.onscroll = function(e) { newanchor.addclass();} |
评论