0
我是Jquery的新手,我使用.net組件創建組織結構圖,每個圖表的成員都有一個按鈕。我想改變包含按鈕的DIV的顏色以及具有相同按鈕的其他DIV的顏色。如果子按鈕與點擊按鈕相同,則更改div顏色
例如在我的代碼下面,如果按鈕77770001被選中,那麼我想改變周圍的DIV rocItemTemplate爲不同的顏色,但也有其他任何具有相同值的子元素的div。誰能幫忙?
<div id="RadOrgChart1" class="RadOrgChart RadOrgChart_Default">
<!-- 2012.1.301.40 --><div class="rocViewPort" style="visibility: hidden; width: 800px; ">
<ul class="rocNodeList rocRootNodeList" style="width: 780px; visibility: visible; ">
<li class="rocNode rocRootNode" style="width: 770px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl43$LinkButtonNode" value="02079891000" id="ctl43_LinkButtonNode" class="middle">
</div>
</div><ul class="rocNodeList rocLevel1" style="width: 770px; ">
<li class="rocNode rocFirst rocLast rocOnly" style="width: 770px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl47$LinkButtonNode" value="77770001" id="ctl47_LinkButtonNode" class="middle">
</div>
</div><ul class="rocNodeList rocLevel2" style="width: 770px; ">
<li class="rocNode rocFirst" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" value="01494561123" name="ctl51$LinkButtonNode" id="ctl51_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li><li class="rocNode" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl54$LinkButtonNode" value="77770001" id="ctl54_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li><li class="rocNode" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl57$LinkButtonNode" value="77770002" id="ctl57_LinkButtonNode" class="middle">
</div>
</div><ul class="rocNodeList rocLevel3" style="width: 120px; ">
<li class="rocNode rocFirst rocLast rocOnly" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl61$LinkButtonNode" value="0061422226212" id="ctl61_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li>
</ul><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span><span class="rocLineDown"><!-- --></span>
</div></li><li class="rocNode rocLast" style="width: 380px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" name="ctl64$LinkButtonNode" value="77770003" id="ctl64_LinkButtonNode" class="middle">
</div>
</div><ul class="rocNodeList rocLevel3" style="width: 380px; ">
<li class="rocNode rocFirst" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" value="0061431540656" name="ctl68$LinkButtonNode" id="ctl68_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li><li class="rocNode" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" value="0061883836198" name="ctl71$LinkButtonNode" id="ctl71_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li><li class="rocNode rocLast" style="width: 120px; "><div class="rocItem rocNoOwnImage">
<div class="rocItemTemplate">
<input type="submit" value="0061883836255" name="ctl74$LinkButtonNode" id="ctl74_LinkButtonNode" class="middle">
</div>
</div><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span>
</div></li>
</ul><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span><span class="rocLineDown"><!-- --></span>
</div></li>
</ul><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span><span class="rocLineDown"><!-- --></span>
</div></li>
</ul><div class="rocNodeLines">
<span class="rocLineHorizontal"><!-- --></span><span class="rocLineUp"><!-- --></span><span class="rocLineDown"><!-- --></span>
</div></li>
</ul>
</div><input id="RadOrgChart1_ClientState" name="RadOrgChart1_ClientState" type="hidden">
編輯:
我還應該說,按鈕被點擊所有不包含數字別人點擊時必須改變,以一個不同的類