Closed althaus closed 9 years ago
Hey,
I'm playing around with your nifty plugin to streamline some Bootstrap Tabs. I encountered an issue with the pathname on switching the tabs:
When I'm on a page like
http://example.org/foo/bar/page
containing tabs #foo and #bar switching a tab causes the browser to show
#foo
#bar
http://example.org/#foo http://example.org/#bar
which isn't what I'd want. Changing L26 [1] from
history.pushState(null, null, '#' + hash);
to
history.pushState(null, null, window.location.pathname + '#' + hash);
fixes this for me and the browser shows the desired history updates:
http://example.org/foo/bar/page#foo http://example.org/foo/bar/page#bar
Cheers Matthias
[1] https://github.com/aidanlister/jquery-stickytabs/blob/master/jquery.stickytabs.js#L26
Thanks, I've pushed 6d05378, let me know if that fixes your issue and thanks for providing the fix!
6d05378 works fine for me.
Hey,
I'm playing around with your nifty plugin to streamline some Bootstrap Tabs. I encountered an issue with the pathname on switching the tabs:
When I'm on a page like
containing tabs
#foo
and#bar
switching a tab causes the browser to showwhich isn't what I'd want. Changing L26 [1] from
to
fixes this for me and the browser shows the desired history updates:
Cheers Matthias
[1] https://github.com/aidanlister/jquery-stickytabs/blob/master/jquery.stickytabs.js#L26