Active Tab change through javascript

How to change the active tab class pro-grammatically? Basically all my tabs refers to the same left panel one at a time. For example - Onclick of tab1 left-panel opens when tab1 is active. Onlick of tab2 left-panel opens when tab2 is active.

Following code works only for left panel clicking but not for active tab highlighting. Pls suggest.

$$("#stage2").removeClass(‘panel-open tab-link-active’);
$$("#stage1").addClass(‘panel-open tab-link-active’);'#yourTabID');

I use the same’#yourTabID’);

put in method, then call using button.

<button type=“button” @click=‘testTab()’>Test

methods: {
testTab: function() {’#yourTabID’);

Unfortunately, it return white screen. I’m using Framework 7 version 5. Please advice.

Nevermind, solved it with


Should have mention in docs anyway. Or did I miss it.

I use it like this:

$$(document).on('page:init', '.page[data-name="pageName"]', function (e) { 
  $$('.page-content').find('#buttonID').on('click', function (e) {'#tabID');