Hi,
app.tab.show() does nothing when the tab is active and visible, i have a handle on tabShow that generate tab content and i need to trigger tabShow event on a tab when it is needed. couldn’t find any workaround !
Regards.
Hi,
app.tab.show() does nothing when the tab is active and visible, i have a handle on tabShow that generate tab content and i need to trigger tabShow event on a tab when it is needed. couldn’t find any workaround !
Regards.
If tab is already active, it won’t fire this event. Why not just call that handle that you have directly?
You can trigger it manually like:
var $tabToTrigger = $('.some-tab-to-trigger');
$tabToTrigger.trigger('tab:show');
app.emit('tabShow', $tabToTrigger[0]);
Unfortunately it is not working!
i tried both:
app.emit(‘tabShow’,$("#tab-element-id").get(0)); // not working
$("#tab-element-id").trigger(‘tab:show’); // not working too
i use jquery not the Dom7!
Then i guess you have some different layout, impossible to say without seeing whole picture. But i will highly recommend to go with this:
Why not just call that handle that you have directly?
I changed the code and now calling the handler.