<div class="cdlButton" style="width:40px; float: left;"> // want this div element
<div style="">
<a id="changestatus" class="" onclick="changeWorkflowStatus()" href="#">
<img id="" width="32px" height="32px" title="disable" alt="disable" src="images/disable.png">
</a>
</div>
</div>
我想用jQuery 眼下的幫助DIV的ID我在做這樣家長使用jQuery
$("#changestatus ").parent().parent().addClass('disablecdlButton');
有沒有其他的方式來獲得最高的div元素
感謝您的回覆。 cdlButton類不是必需的。如果班級在場,仍然是更好的選擇 – rahul