barekit icon indicating copy to clipboard operation
barekit copied to clipboard

Utilize anchors for tabs

Open trevanhetzel opened this issue 10 years ago • 2 comments

Currently, clicking a tab anchor prevents its href from being followed. We should allow hrefs to be followed so you can navigate to a URL with the hash (ex: a2labs.github.io/bare-ninja#accordion)

trevanhetzel avatar Jun 30 '14 21:06 trevanhetzel

@trevanhetzel Like this? http://jsfiddle.net/mhb6p6zt/13/show/

So clicking one of the links would allow default behaviour. eg: example.html#test6

I've got some code ready that also prevents default if a tab link only contains a hash tag. Let me know and I can do a PR.

ttbarnes avatar Oct 07 '14 16:10 ttbarnes

I'm not really seeing it in your example. What I'm talking about would allow you to, without clicking a tab anchor, open up that tab by manipulating the URL to have a hash that matches that of the tab you want open.

The more I think about it, the functionality would almost be exactly like this article I wrote that uses the :target selector. Only problem with that is the jumpiness (and :target is not supported in IE8/9).

trevanhetzel avatar Oct 07 '14 16:10 trevanhetzel