元はheight:50pxのdivを、
jQueryのanimateを使いheight:100%に変えています。
この際に、px > %への変更なのでアニメーションが起きないのですが、
起こるようにする手法はありますでしょうか??
.novel-descriptionを50px > 100%へ変更しています。
css
1//novel 2.novel-description{ 3 height: 50px; 4 overflow: hidden; 5}
javascript
1 $(".fa-angle-down").click(function(){ 2 $(this).siblings(".novel-description").animate({height: "100%"},"slow"); 3 $(this).hide(); 4 })
haml
1 .card.text-muted.mt-1.mb-0.p-2.border-0 2 .novel-description 3 = simple_format(@novel.description) 4 .fa.fa-angle-down.mt-2.mx-auto
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/31 04:10
2018/07/31 04:14
2018/07/31 05:14