"tableClass"クラスの表にスタイルを割り当てる必要があります。私は以下のマークアップを持っています。 datarowclass
からjqueryで親に行く最速の方法
<table border="0" cellpadding="0" cellspacing="0" class="tableClass">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" class="tableClass"> <-- Need to add a style here
<tr class="colheadrowclass">
.. some markup here
</tr>
more markup
<tr id="dataRow" class="datarowclass">
</tr>
</table>
</td>
</tr>
</table>
、私はクラスtableClass
で最初のテーブルまでを横断し、それにスタイルを追加する必要があります。
これは私にとってはうまくいくが、もっと速い方法があるのだろうかと思っていた。
$(".datarowclass").parents("table").eq(0).css("hieght", "500px");