Nav background-color au défilement

PHOTO EMBED

Thu Mar 25 2021 21:13:14 GMT+0000 (UTC)

Saved by @Remzos #jquery

// 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");
      }
    });
  });
});
content_copyCOPY