renettarenula / anchorific.js

⚓️ Generates anchored headings and nested anchored-based navigations based on header tags
MIT License
138 stars 30 forks source link

accept percentage spyOffset, prepend <ul> to nav #9

Closed whatsnewsisyphus closed 1 week ago

whatsnewsisyphus commented 10 years ago

Now it accepts percentage values for spyOffset, as is more appropriate for most sites, adapting to window height. <ul> is prepended to target <nav> instead of appended, relocating back to top link to bottom as appropriate and less glitchy when it is added/removed by css(display:none;)

whatsnewsisyphus commented 10 years ago

See new commit for more options, optimized performance especially for mobile browsers. Would welcome better coding advice from proper coders. Everything is fine and well implemented, but I'm sure some closures/wrappers can be shaved away to make it leaner (I only added a handful of lines regardless)