Navbar Fixed JS Code Logic
<script>
var navbar = document.querySelector('.fixed-top';
window.onscroll = function() {
// pageYOffset or scrollY
if (window.pageYOffset > 0)
{
navbar.classList.add('scrolled')
}
else
{
navbar.classList.remove('scrolled')
}
}
</script>