How to check if tab is active?


#1

Im using the swipable tabs and I cant check when a tab is visible/active.
I have tested with this and it doesn´t work.

app.on('tab:show', '.tab-active', function (page) {
   console.log('tab is visible');
});
$$(document).on('tab:show', '.tab-active', function() {
    console.log('tab is visible');
  });
$$(document).on('tab:show', '#tab1', function() {
    console.log('tab is visible');
  });

Thanks.


#2

hi,

app.on('tabShow', function (e, t) {
 alert('hello from: ' + e.id)
})

eg:
jsfiddle


#3

Thanks pvtallulah
I think I have tried that and somehow it is not working for me.
I have to try it again, thanks.