Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function() {
- if (location.hash) {
- $("a[href='" + location.hash + "']").tab("show");
- }
- $(document.body).on("click", "a[data-toggle='tab']", function(event) {
- location.hash = this.getAttribute("href");
- });
- });
- $(window).on("popstate", function() {
- var anchor = location.hash || $("a[data-toggle='tab']").first().attr("href");
- $("a[href='" + anchor + "']").tab("show");
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement