好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

bootstrap中刷新页面,tab页选中不改变。_html/css_WEB-ITnose

直接拷贝本人代码即可 注意在同级目录下引用 相应的js 和 css。

能实现tab效果 关键看bootstrap的 data-toggle= tab









$(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');
});





Home
Profile
Messages
Settings



home

查看更多关于bootstrap中刷新页面,tab页选中不改变。_html/css_WEB-ITnose的详细内容...

  阅读:35次