我想要使用jquery获取.more类和.popovercontent div的宽度和高度。 popover-content类的宽度是动态的,它可以改变,因为我从我的数据库中获取宽度。 Iam由此得到下面的分区。所以我想知道如何使用这个如何在jQuery中访问此内部的宽度和高度
console.log(this);
得到的宽度和高度它显示如下的结果
<div id="picture1-more4" class="more more32 ltr-slide bgblack" style="top: 288px; left: 549px; z-index: 1; width: 32px; height: 32px;">
<div class="imgButton imgButtonDrag imgButtonDrag imgButtonDrag imgButtonDrag imgButtonDrag imgButtonDrag imgButtonDrag imgButtonDrag moreblack"></div>
<div class="popover-inner red" style="margin-left:50px;">
<div class="arrow-right3" style="display: inline-block !important; border-left-width: 10px; border-left-style: solid; border-left-color: green; border-top-width: 10px; border-top-style: solid; border-top-color: transparent; border-bottom-width: 10px; border-bottom-style: solid; border-bottom-color: transparent; position: absolute; top: 50%;"></div>
<h4 class="popover-title"><a href="" target="self">Garden</a></h4>
<div class="popover-content" style="width:400px;"><p>To view details about either the Security or Maintenance section, click the heading or the arrow next to the heading to expand or collapse the section. If you dont want to see certain types of messages, you can choose to hide them from view. </p></div>
</div></div>
感谢您的解决方案为我工作。 –