Sticky navigation on scroll

1
2
$(window).scroll(function (event)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Basic script to detect how many pixels have been scrolled and apply a CSS class to the navigation element.

1 Response

Here's the playground I made to illustrate the functionality:
https://codepad.co/snippet/r9DyeVg6

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.