I am following the documentation of
https://keenthemes.com/metronic/tailwind/docs/components/tabs
I was testing the tab funcionality the 'show' event is called but the 'shown' is not called after the tab is successfully called, with the exact example that is on the docs , this might be a bug
My current version is 9.0.3
Hi,
Please try to get the latest v9.0.4 since this version has some bug fixes.
However, the tabs event API should work as expected. Please try to use the below code:
<div class="tabs mb-5" data-tabs="true" >
...
</div>
<script>
window.onload = function() {
const tabsEl = document.querySelector("#my-test-tabs");
const tabs = KTTabs.getInstance(tabsEl);
tabs.on("show", () => {
alert(1);
});
tabs.on("shown", () => {
alert(5);
});
};
</script>