Closed marcobardenheuer closed 3 years ago
Hi there, the toggle()
method is perfect for this kind of use-case. Adding this to your code should do it.
// If there's a relevant hash, show the tab
if (window.location.hash) {
tabs.toggle('#' + window.location.hash);
}
Relevant link in the docs: https://github.com/cferdinandi/tabby#toggle
What about giving tabby extended anchor link support?
Example Use Case:
Allow tabs to be opened from anchor links which are not part of tabby. See forked Codepen here: Clicking the link
<a href=#neville class=hero-link>More on Neville</a>
should open the corresponding tab.