// SCROLL NAV jQuery(document).ready(function ($) { $(function () { var header = $(".navFix"); $(window).scroll(function () { var scroll = $(window).scrollTop(); if (scroll >= 300) { header.removeClass("header").addClass("bg"); } else { header.removeClass("bg").addClass("header"); } }); }); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter