MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / myFunction

Function myFunction

script.js:3639–3645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3637var sticky = navbar.offsetTop;
3638
3639function myFunction() {
3640 if (window.pageYOffset >= sticky) {
3641 navbar.classList.add("sticky");
3642 } else {
3643 navbar.classList.remove("sticky");
3644 }
3645}
3646
3647window.onscroll = function() {
3648 myFunction();

Callers 1

script.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected