How make li elements slide down and up?

前端 未结 5 1543
孤街浪徒
孤街浪徒 2021-01-26 07:22

I have

  • elements in a
      and I want them expand down and up and each element should expand down and up.

      HTML:

      
      
              
  • 5条回答
    •  醉梦人生
      2021-01-26 08:27

      How about this? http://jsfiddle.net/StartStep/5svS8/ The problem was with overflow: hidden and jquery selector

      $('.expand').click(function(){
          $(this).parent('.answer').css({'height':'auto','overflow':'scroll'});  
      })
      

    提交回复
    热议问题