Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic 9 Tailwind Tab Shown event is not called


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


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


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>


The above code worked well for all major browsers.

Please let us know if you need any further help.

Regards,
Sean


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(