Expanding div to scroll height

前端 未结 2 1542
礼貌的吻别
礼貌的吻别 2021-01-29 05:55

I need to expand a div that has overflow set to hidden via css. When clicking on «expand» the hight of the div is expanded to the hight necessary to display the whole text. To a

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-29 06:45

    your code does not cover DOM changes. Use the following:

    $( ".aufklappen" ).on("click", function() {
      ...
    });
    

提交回复
热议问题