$(function () {
//修复collapse不能正常折叠的问题
$(".collapsed").click(function () {
var itemHref = $(this).attr("href");
var itemClass = $(itemHref).attr("class");
if (itemClass === "panel-collapse collapse") {
$(itemHref).attr("class", "panel-collapse collapse in").css("height", "auto");
} else {
$(itemHref).attr("class", "panel-collapse collapse").css("height", "0px");
}
return false;//停止运行bootstrap自带的函数
});
})

posted on 2017-08-22 23:22  芝麻的西瓜  阅读(1447)  评论(0编辑  收藏  举报