We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm trying to set up crossroads.js to work with bootstrap tabs, so a URL may be /mainpage#latestnews
Looking at hasher and history.js, is there an example as to how this can work and how hash tab routes can be created?
Thanks
The text was updated successfully, but these errors were encountered:
(with jQuery) I use
$(window).on('hashchange', function(e){ // code to switch bootstrap tabs });
Based on the answer from the following SO question...
https://stackoverflow.com/questions/17830590/bootstrap-tab-activation-with-jquery
your implementation could look something like:
// detect hashchange $(window).on('hashchange', function(e){ // clean #hash var hash = window.location.hash.substr(1); // "show" the tab with #{hash} url $('.nav-tabs a[href="#' + hash + '"]').tab('show'); });
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm trying to set up crossroads.js to work with bootstrap tabs, so a URL may be /mainpage#latestnews
Looking at hasher and history.js, is there an example as to how this can work and how hash tab routes can be created?
Thanks
The text was updated successfully, but these errors were encountered: