我正在设置tdas的高度,auto并希望将height其td设置为其他tdin colorbox。这是我的html
<tr>
<td class="heading1" id="mhheading"><?php echo $this->translate("Medical History"); ?> </td>
<td class="info1" style="height:auto;" id="mhinfo"><?php echo $this->patientDetail['medical_history'];?></td></tr>
我的身高越来越高,id="mhinfo"想坐进去id="mhheading"。
我的 jquery 代码就像这里
$(document).ready(function () {
$('#mhheading').css('height',$('#mhinfo').height());
console.log($('#mhinfo').height());
});
我在控制台中看到它正在返回0。我用过window.load,document.load但在所有情况下它都在返回0。我再次在colorbox.