Current class on on the actual dropdown toggle button in navbar?

You have to use custom code for this. Paste in Site Footer Code, then add the class dropdown-active to your dropdown and style this class.

<script>
$('.w-dropdown').each(function() {
  var hasActiveLink = $(this).find('.w--current').length > 0;
  $(this).find('.w-dropdown-toggle').addBack().toggleClass('dropdown-active', hasActiveLink);
});
</script>

http://sandbox-903b9c.webflow.io/current-class-on-dropdown-containing-current-link

https://preview.webflow.com/preview/sandbox-903b9c?preview=2a77d4d5446ddad097abb9bf8603288b


Also, feel free to contact me for further code help and/or customization of third-party plugins

9 Likes