Changing div colour if child button is the same as button clicked
<p>I'm new to Jquery, I am using a .net component to create an organisational chart which each member of the chart has a button. I want to change the color of the DIV containing the button and also any other DIV which has the same button.</p>

<p>For example in my code below if the button 77770001 was selected then i would like to change the surrounding DIV rocItemTemplate to a different colour but also any other div which has a child with the same value. Can anyone help?</p>

<pre><code>&lt;div id="RadOrgChart1" class="RadOrgChart RadOrgChart_Default"&gt;
&lt;!-- 2012.1.301.40 --&gt;&lt;div class="rocViewPort" style="visibility: hidden; width: 800px; "&gt;
    &lt;ul class="rocNodeList rocRootNodeList" style="width: 780px; visibility: visible; "&gt;
        &lt;li class="rocNode rocRootNode" style="width: 770px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
            &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl43$LinkButtonNode" value="02079891000" id="ctl43_LinkButtonNode" class="middle"&gt;

            &lt;/div&gt;
        &lt;/div&gt;&lt;ul class="rocNodeList rocLevel1" style="width: 770px; "&gt;
            &lt;li class="rocNode rocFirst rocLast rocOnly" style="width: 770px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl47$LinkButtonNode" value="77770001" id="ctl47_LinkButtonNode" class="middle"&gt;

                &lt;/div&gt;
            &lt;/div&gt;&lt;ul class="rocNodeList rocLevel2" style="width: 770px; "&gt;
                &lt;li class="rocNode rocFirst" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                    &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" value="01494561123" name="ctl51$LinkButtonNode" id="ctl51_LinkButtonNode" class="middle"&gt;

                    &lt;/div&gt;
                &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                    &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                &lt;/div&gt;&lt;/li&gt;&lt;li class="rocNode" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                    &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl54$LinkButtonNode" value="77770001" id="ctl54_LinkButtonNode" class="middle"&gt;

                    &lt;/div&gt;
                &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                    &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                &lt;/div&gt;&lt;/li&gt;&lt;li class="rocNode" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                    &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl57$LinkButtonNode" value="77770002" id="ctl57_LinkButtonNode" class="middle"&gt;

                    &lt;/div&gt;
                &lt;/div&gt;&lt;ul class="rocNodeList rocLevel3" style="width: 120px; "&gt;
                    &lt;li class="rocNode rocFirst rocLast rocOnly" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                        &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl61$LinkButtonNode" value="0061422226212" id="ctl61_LinkButtonNode" class="middle"&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                        &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                    &lt;/div&gt;&lt;/li&gt;
                &lt;/ul&gt;&lt;div class="rocNodeLines"&gt;
                    &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineDown"&gt;&lt;!-- --&gt;&lt;/span&gt;
                &lt;/div&gt;&lt;/li&gt;&lt;li class="rocNode rocLast" style="width: 380px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                    &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" name="ctl64$LinkButtonNode" value="77770003" id="ctl64_LinkButtonNode" class="middle"&gt;

                    &lt;/div&gt;
                &lt;/div&gt;&lt;ul class="rocNodeList rocLevel3" style="width: 380px; "&gt;
                    &lt;li class="rocNode rocFirst" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                        &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" value="0061431540656" name="ctl68$LinkButtonNode" id="ctl68_LinkButtonNode" class="middle"&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                        &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                    &lt;/div&gt;&lt;/li&gt;&lt;li class="rocNode" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                        &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" value="0061883836198" name="ctl71$LinkButtonNode" id="ctl71_LinkButtonNode" class="middle"&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                        &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                    &lt;/div&gt;&lt;/li&gt;&lt;li class="rocNode rocLast" style="width: 120px; "&gt;&lt;div class="rocItem rocNoOwnImage"&gt;
                        &lt;div class="rocItemTemplate"&gt;


           &lt;input type="submit" value="0061883836255" name="ctl74$LinkButtonNode" id="ctl74_LinkButtonNode" class="middle"&gt;

                        &lt;/div&gt;
                    &lt;/div&gt;&lt;div class="rocNodeLines"&gt;
                        &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;
                    &lt;/div&gt;&lt;/li&gt;
                &lt;/ul&gt;&lt;div class="rocNodeLines"&gt;
                    &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineDown"&gt;&lt;!-- --&gt;&lt;/span&gt;
                &lt;/div&gt;&lt;/li&gt;
            &lt;/ul&gt;&lt;div class="rocNodeLines"&gt;
                &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineDown"&gt;&lt;!-- --&gt;&lt;/span&gt;
            &lt;/div&gt;&lt;/li&gt;
        &lt;/ul&gt;&lt;div class="rocNodeLines"&gt;
            &lt;span class="rocLineHorizontal"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineUp"&gt;&lt;!-- --&gt;&lt;/span&gt;&lt;span class="rocLineDown"&gt;&lt;!-- --&gt;&lt;/span&gt;
        &lt;/div&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;&lt;input id="RadOrgChart1_ClientState" name="RadOrgChart1_ClientState" type="hidden"&gt;
</code></pre>

<p></p>

<p>Edit:</p>

<p>I should also say that when the button is clicked all the others which do not contain the number clicked must be changed to a different class</p>
