Hello everyone,
I am building a nav bar with an expandable menu to display the projects for my portfolio. I want to add a class to the “work” nav link so I can bold the text once someone clicks on it to open the menu and disable it when they close it.
I tried using custom code to add the class “current” to the nav link with class “open” to change the font-weight but I seem to be doing something wrong because the class isn’t getting selected.
<Style>
.current {font-weight:700;}
</Style>
<script>
$('.open').on('click', function(){
$('.open').addClass('current');
});
$('.close').on('click', function(){
$('.open').removeClass('current');
});
</script>