see the method on the Internet but don"t quite understand what it means. Please explain
$(document) .ready (function () {
if(location.hash) {
$("a[href=" + location.hash + "]").tab("show");
}
$(document.body).on("click", "a[data-toggle]", 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");
});-sharp-sharp-sharp problem description
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)