Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はjQueryタブctrlを持っています。各タブにはテキストエリアがあります。親div内のタブを最大化したいので、cssでタブdivを100%の幅/高さに設定するとうまくいきます。しかし、どうすればテキストエリアを最大化できますか?
目的: タブは親 div を埋め、テキストエリアは親タブを埋めます。親 div のサイズが変更されると、タブとテキストエリアもサイズ変更されます。
var $tabs = $('tabsSelector'); var $parentPane = $('parentSelector') var newHeight = $parentPane.height() - 10; $tabs.height(newHeight); var navHeight = $tabs.find(".ui-tabs-nav:first").height(); $tabs.children(".ui-tabs-panel").height(newHeight - navHeight);