Select Closest span
<p>Here is my HTML code  </p>

<pre><code>                &lt;span class="xxt" style=""&gt;Hide Me&lt;/span&gt;
                &lt;div&gt;&lt;br/&gt;&lt;/div&gt;
                &lt;div&gt;&lt;/div&gt;
                &lt;span style=""&gt;
                    &lt;table&gt;
                        &lt;tr&gt;
                            &lt;td style=""&gt;
                                &lt;div&gt;&lt;/div&gt;
                                &lt;input type="radio" class="a"&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/span&gt;

                &lt;span class="xxt" style=""&gt;Hide Me&lt;/span&gt;
                &lt;div&gt;&lt;br/&gt;&lt;/div&gt;
                &lt;div&gt;&lt;/div&gt;
                &lt;span style=""&gt;
                    &lt;table&gt;
                        &lt;tr&gt;
                            &lt;td style=""&gt;
                                &lt;div&gt;&lt;/div&gt;
                                &lt;input type="radio" class="a"&gt;
                            &lt;/td&gt;
                        &lt;/tr&gt;
                    &lt;/table&gt;
                &lt;/span&gt;
</code></pre>

<p>I am trying to access the closest span element with class "xxt" which is nearer to the parent span of the changed radio button.<br>
Here is my code  </p>

<pre><code>       $('.a').live('change',function()
         {
            $(this).parents('span').closest('.xxt').addClass('DestQID');
            $('.DestQID').hide();
         });
</code></pre>

<p>Here is <a href="http://jsfiddle.net/YJVbb/1/" rel="nofollow">my test jsfiddle</a> </p>
