0
我在寻找的是让我的容器调整onclick。JQUERY收听点击事件
容器内部是2个面板,滑动下来的高度不同。我需要容器来监听切换功能,并根据需要调整大小。
继承人的代码,那么远,
$(document).ready(function() {
var content = $("#content_container");
var childHeight = $('.panel-container').height();
if (content < childHeight) {
$(content).css("height", 657 + "px");
}
else {
$(content).css("height", "auto");
}
});
PS。我是jQuery新手!
设置你的容器自动的高度将不起作用??? –