0

div を展開可能にするスクリプトを作成しました。

$('.expandable').find('h2').on('click', function(){
      $(this).parent().css({height: (parseInt($(this).parent().css('height')) > 50)?'25px':'auto'});
      $(this).find('i').toggleClass('icon-plus-sign icon-minus-sign', 300);
  })

div エキスパンドの速度または期間を構成するにはどうすればよいですか。ゆっくりとスムーズにダウンさせたいです。

ありがとう

ここに私のアコーディオン

4

2 に答える 2

0

高さを変更するanimate代わりに使用します。css

http://api.jquery.com/animate/

于 2012-11-02T12:25:42.873 に答える