jQuery height() returns 0 on a visible div - why?

前端 未结 5 700
一个人的身影
一个人的身影 2020-12-09 07:21

I have a container (thetext1) with a set height of 360px. \"thetext1\" contains two divs - one on the left and one floated to the right - into both of which content is deli

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 07:53

    newhgt = $('#thetext1').find('div.rhs').css("background", "pink")[0].getBoundingClientRect().height;
    

提交回复
热议问题