Dropdown menu problem: Can't access 'Current' setting

Hi there,

I have succesfully used custom code to link (across pages) to tabs from a dropdown menu.

  1. I gave each tab a unique class
  2. I selected the link i wanted to be aimed for the tab. In the URL field I put:
    /name-of-page?tab=my-tab-class for each link

added this code:

var Webflow = Webflow || [];
Webflow.push(function () {
var tabName = getParam('tab');
if (!tabName) return;

$('.' + tabName).triggerHandler('click');

function getParam(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].
replace(/\+/g, " "));

All good, but I can’t figure out how to access the ‘current’ style for the dropdown menu, so i am stuck with it being blue (which I don’t want. )

Any ideas how I could do this. Many thanks!

Read-only link below

Here is my site Read-Only: Webflow - dropdown styling
(how to share your site Read-Only link)