How to get the parent id in jquery and values of all elements in that parent?
<p>Hi all i have a which looks like this</p>

<pre><code>               &lt;div id="Address1" class="span4"&gt;
                    &lt;ul class="address-customstyle unstyled"&gt;
                     &lt;a href="#"&gt;&lt;i onclick="EditAddress(this.id)" id="2" class="icon-edit mrglft largesize"&gt;
                                 &lt;/i&gt;&lt;/a&gt;&lt;a href="#"&gt;&lt;i onclick="DeleteAddress(this.id)" id="Address1" class="icon-remove mrglft largesize"&gt;
                                                   &lt;/i&gt;
                                             &lt;/a&gt;
                                        &lt;li&gt;
                                 &lt;label&gt;
                         &lt;strong&gt;
             &lt;u id="addressname"&gt;
                       asdasd
                  &lt;/u&gt;
                &lt;/strong&gt;: &lt;/label&gt;
               &lt;span&gt;
                &lt;p id="hno"&gt;asdasd&lt;/p&gt;,
                 &lt;p id="streetname"&gt;asdasd&lt;/p&gt;,
                 &lt;p id="city"&gt;asdasd&lt;/p&gt;,&lt;p value="1" id="state"&gt;Andhra Pradesh&lt;/p&gt;
               &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
</code></pre>

<p>now when i click on EditIcon i have the id of this</p>

<pre><code>              &lt;i onclick="EditAddress(this.id)" id="2" class="icon-edit mrglft largesize"&gt;
</code></pre>

<p>now what i want is based on this i have to get the parent div and the values of its childrens</p>

<p>like values of all "p" elements and value of "u" can any one tell me how can i do this  </p>

<p>this waht i am doing for now but its not going in the loop</p>

<pre><code>     function EditAddress(addressid) {
    alert(addressid);       
    alert(addresses);
    $("" + "#" + addressid + "").parent('.span4').find('p').each(function () {
        var $span = $(this);            
        var spanId = $span.attr('id');
        alert(spanId);
        var spanTxt = $span.text()
        alert(spanTxt);
    });
</code></pre>
