Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: navbar color not changing on scroll

Santosh Kumar free asked 3 years ago


$(window).scroll(function(){ $('nav').toggleClass('scrolled', $(this).scrollTop() > 1080); });

.fixed-top.scrolled { background:#fff !important; } hello i am using this code to change my nav color while scroll but it is not working kindly help me


Marcin Luczak staff commented 3 years ago

Hi,

Please create a snippet with your whole code of the navbar. Without the context, it will be difficult to find what is wrong.

Keep coding,

Marcin



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: system
  • Browser: google chrome
  • OS: intel duel core
  • Provided sample code: No
  • Provided link: No