Sha256: 605732928c65d136654e8e513f1355727904baa13a2c2cea30c02ddc7451729e
Contents?: true
Size: 659 Bytes
Versions: 94
Compression:
Stored size: 659 Bytes
Contents
export default () => { $(document).ready(function(){ const $body = $('.Vlt-main'); const nav = $('.Nxd-header'); const codeNav = $('.Nxd-api__code__header'); $body.on('scroll', function(){ var scrollTop = $body.scrollTop(); //navigation if (scrollTop > 50) { nav.addClass('Nxd-scroll-minify'); } else { nav.removeClass('Nxd-scroll-minify'); } //api code if (scrollTop > 70 && codeNav.length > 0) { codeNav.addClass('Nxd-api__code__header--sticky'); } else if(codeNav.length > 0) { codeNav.removeClass('Nxd-api__code__header--sticky'); } }); }) }
Version data entries
94 entries across 94 versions & 1 rubygems