title: how to get parent div by using children div in jQuery?
body: <p>in this i want div1 as answer...with the children divTab1Btn</p>
  
  <p>am using </p>
  
  <pre><code>$('#divTab1Btn').closest().attr("id");
  </code></pre>
  
  <p>But am getting undefined ? what is the correct solution ?</p>
  
  <pre><code>&lt;div id="div1"&gt;
      &lt;div id="divTab1Heading" style="background-color: rgb(246, 246, 246);"&gt;
          &lt;table style="width: 1024px; height: 40px;" border="0" cellspacing="0" cellpadding="0"&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td align="left" style="width: 911px; float: left;"&gt;
                          &lt;div disabled="disabled" class="tabBtn" id="divTab1Btn" style="display: block; visibility: visible;"&gt;
                              &lt;input class="btneditclick" id="divTab1BtnEdit" style="width: 75px; display: block; visibility: visible;" type="button" value="Edit" table2focus="tblAddtype" classvalue="1"&gt;
                              &lt;input class="btnconfirm" id="divTab1BtnConfirm" style="width: 85px; display: none; visibility: hidden;" type="button" value="Confirm" classvalue="1" hdnheadergridlinkfield="ADD_MRECID" gridid="1655"&gt;
                          &lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>