Streaming live at 10am (PST)

Reinitialize active tab

At the test site below you can see that the Before </body> function updateWidth(); doesn’t initialize unless the associated html is in the w--tab-active tab on load.

After contacting Webflow they said that there needs to be a redraw of the Tab’s using the native function: webflow.require('tabs').redraw();

Does anyone know how to successfully call this function inside of custom code to get the Webflow Tabs to redraw on click/ for w--tab-active?

I tried the below without success:

$(’.w-tab-link’).click(function() {
Webflow.require(‘tab’).redraw();
return false;
});

https://kyles-dynamite-project-efe535.webflow.io/

https://preview.webflow.com/preview/kyles-dynamite-project-efe535?utm_medium=preview_link&utm_source=designer&utm_content=kyles-dynamite-project-efe535&preview=6081e75b40b43f3aa2b35f161e8ec22e&mode=preview

I haven’t dealt with this before, but your selector for (‘tab’) isn’t defined, there is a console error being thrown:

image

Might be a good place to start.

@cyberdave FYI I have continued this inquiry here.

@sam-g

I think ‘tabs’ is a general selector. I have also tried naming it to a class without success.

I’m pretty sure re-initializing the tab every time will require a more complex solution.