You could use the id value for each tab (tab0, tab1, etc) which I imagine you store in the database.
Or if you want the same to happen to all tabs, you could call the function on a class, say “db-tabs”, (or “tab-category”) that all the tabs share, like
$(".db-tabs" ).on('tab:show', function() {
var $tabEl = $(this);
var tabId = $tabEl.attr('id');
// further logic based on tab ID that became visible
...
})
// event inializate page when loaded
document.addEventListener("DOMContentLoaded", function(event) {
alert("Page init!");
var tabId = $(".tab-active" ).attr('id'); // get Id from div with class tab-active // may be work )))
});