Topic: Navbar don\\\\\\\'t chages color on scroll

tgit pro asked 6 years ago


Hi I using the navbar the same example changes the color on scroll but is not working for me this my code<nav class=\\\"navbar navbar-expand-lg navbar-dark fixed-top scrolling-navbar\\\">some one can help me please thanks

Piotr Glejzer staff answered 6 years ago


Hi tgit, Thank you very much for your answer! We will check it. Your fix is doing great job so we will think about that. Have a nice day! Best, Piotr

tgit pro answered 6 years ago


Well I don't know is the better solution but I fix this issue create my own script on jquery  this is my coding if(position < scroll ){ console.log(scroll); $('nav').addClass('navbar-light'); $('nav').addClass('white'); $('nav').removeClass('navbar-dark'); } else { $('nav').removeClass('navbar-light'); $('nav').removeClass('white'); $('nav').addClass('navbar-dark'); } I hope this help some one

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags