Answer the question
In order to leave comments, you need to log in
How can I make it so that when you follow a link, not only a new page opens, but also the necessary tab (bootstrap tabs) on it?
Made on bootstrap, install on modx
Answer the question
In order to leave comments, you need to log in
Good day!
Everything seems to be in the documentation on the official website: getbootstrap.com/javascript/#tabs
You just have to write some additional code:
var url = document.location.toString();
if (url.match('#')) {
$('.nav-tabs a[href=#'+url.split('#')[1]+']').tab('show') ;
}
$('.nav-tabs a').on('shown.bs.tab', function (e) {
window.location.hash = e.target.hash;
})
Is it me or do bootstrap tabs have anchors?
If so, then through link.ru/#anchor should work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question