@samliew Neat workaround! Currently the interval/polling approach is probably the best way to accomplish this. As you’ve discovered, many of our components are lacking a public API. This is intentional, as we are working on getting it right.
In the meantime, your polling approach should do the trick. Here’s a slightly more optimized snippet:
var Webflow = Webflow || ;
// Store cached references to nav elements
var sourceNav = $('#sourceNav');
var targetNav = $('#targetNav');
// Every 200ms
// Find the index of source slideNav button's active class
var index = sourceNav.children('.w-active').index();
// Update target slider by triggering a "tap" event on the targetNav corresponding slide button
}, 200); // End interval
}); // End ready function
Webflow.push() wrapper instead of
$(document).ready() means you can place the code snippet anywhere on the webflow site (even in embed blocks).
Hope that helps!