私はほぼそこにいると思いますが、私はちょうど隠れた子の高さを計算してdivに適用する必要があります。JQueryの折りたたみ/展開の高さの計算の必要性
おそらく子供の高さに基づいて動的に変化する関数を書く必要があります。
デモで、展開/折りたたみイメージをクリックします。
CLICK EXPAND
var currentHeight = $('.Tile.is-expanded .Tile-flyout').outerHeight();
TweenMax.fromTo(".Tile.is-expanded .Tile-flyout", 0.8, { height:0, autoAlpha:0, ease: Linear.easeNone }, { height:currentHeight, autoAlpha:1,});
TweenMax.fromTo(".Tile.is-expanded .Tile-flyout > *", 0.8, {height:0, ease: Linear.easeNone }, {height:"auto"});
のCLICK COLLAPSE
var currentHeightOpen = $('.Tile .Tile-flyout').outerHeight();
TweenMax.fromTo(".Tile .Tile-flyout", 0.8, { height:currentHeightOpen, autoAlpha:1, ease: Linear.easeNone }, {height:0, autoAlpha:0,});
TweenMax.fromTo(".Tile .Tile-flyout > *", 0.8, { height:"auto", ease: Linear.easeNone }, {height:0,});
ここ
DEMO here, you need to fork it
をループ増分を調整するために何かをする必要がありますか?それは私には大丈夫ですか? – Zinc
閉じるボタンをクリックしようとしましたか?その場所全体は、まったく崩壊しません – user3699998
それは私のためです...¯¥¥_(ツ))/¯ – Zinc