Answer the question
In order to leave comments, you need to log in
How to open tab using anchor?
Good day to all. The problem is the following, we have tabs made through a bootstrap script. Each of them has its own ID. and you need to be able to open these tabs using their anchors. The site on which this was done is masterchast.ru/uslugi/proektirovanie-inzhenernyh-sistem and here it is necessary that, for example, with such a url masterchast.ru/uslugi/otoplenie/#da4a , we opened the 4th tab of the dacha take.ms/ QrEzE yu Maybe someone faced this problem and knows how to solve it, tell me please
Answer the question
In order to leave comments, you need to log in
Something like this
(function($) {
$(function() {
var hash = window.location.hash;
$('#myTab a[href="#' + hash + '"]').parent().get( 0 ).toggleClass('active');
})
})(jQuery)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question