标签:this href cti trap turn bootstrap == 问题 attr
$(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自带的函数
});
})
标签:this href cti trap turn bootstrap == 问题 attr
原文地址:http://www.cnblogs.com/zinan/p/7414234.html