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’);

app.tab.show('#yourTabID');

I use the same app.tab.show(’#yourTabID’);

put in method, then call using button.

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

methods: {
testTab: function() {
app.tab.show(’#yourTabID’);
}
}

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

Edit:
Nevermind, solved it with

app.views.current.router.navigate(’./tab-id/’);

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) {
    app.tab.show('#tabID');
  })
})