This major release introduces significant performance and efficiency improvements and a few minor fixes.
You may now register the main tabs container, when creating the DynamicTabs
object using the new
keyword, by passing in an HTMLElement or the ID of the container element (docs). Previously you could only pass in the ID.
There is no longer a need for Google's material icons font library, as the arrow icons for the scrolling buttons are embedded automatically.
There are breaking changes:
- The required HTML markup is now simpler (look at the examples and the main readme)
- The
addSwitchCallback
method now accepts a callback that is given three arguments: the index of the previous tab, the index of the tab currently switched to, and the HTMLElement of the new clicked tab; see https://github.com/dchenk/dynamic-tabs/blob/master/docs/docs.md#tabswitchcallback