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新手!
設置你的容器自動的高度將不起作用??? –