javascript - Goto specific Tab (accordin) on # hyperlink -
i using following code switch tabs. problem if put tabe id in url #, not goto specific tab. <a href="index.php#tab2">tab 2</a> <a href="index.php#tab3">tab 3</a> below code jquery(document).ready(function() { jquery('.tabs .tab-links a').on('click', function(e) { var currentattrvalue = jquery(this).attr('href'); // show/hide tabs jquery('.tabs ' + currentattrvalue).show().siblings().hide(); // change/remove current tab active jquery(this).parent('li').addclass('active').siblings().removeclass('active'); e.preventdefault(); }); }); html code <ul class="tab-links"> <li class="active"><a style="" href="#tab1">account</a></li> <li><a href="#tab2">jobs posted</a></li> <li