Just copy my code directly. Pay attention to quoting the corresponding js and css in the same directory.
<script><br> <br> $(document).ready( function() {<br> if(location.hash) {<br> $('a[href=' location.hash ']').tab('show');<br> }<br> $(document .body).on("click", "a[data-toggle]", function(event) {<br> location.hash = this.getAttribute("href");<br> });<br> } );<br> $(window).on('popstate', function() {<br> var anchor = location.hash || $("a[data-toggle=tab]").first().attr ("href");<br> $('a[href=' anchor ']').tab('show');<br> });<br> </script>
home
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn