I am using the bars function on my mobile menu, and want it to change to black when I scroll. I have this script:
<script>
$(function () {
$(document).scroll(function () {
var $nav = $(".navbar-fixed-top");
$nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height());
});
});
</script>
Which changes the background colour of the header on scroll, how can I change the colour of a class?
Thanks!