On clicking the anchor tag the outermost div must hide along with its child elements
<p>I have a div tag, which contains a div tag, which contains a ul tag which then contains many li tags. On of these li tags contains an anchor element, which when clicked causes the outermost div to hide.</p>

<p>for example</p>

<pre><code>&lt;div class="object" id="123"&gt;
  &lt;div&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#" id="hide"&gt;hide outermost div and its child elements&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div class="object" id="124"&gt;
  &lt;div&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#" id="hide"&gt;hide outermost div and its child elements&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>on clicking the anchor tag the outermost div must hide along with its child elements.</p>

<p>I reckon i need to use parentNode repeatedly.. but is there a simpler way to directly access the outer most div and hence its id. Help would be appreciated. </p>
