title: How to get id of div, on click of button, inside it?
body: <p>I have multiple panels and each panel have Add button in it:</p>
  
  <pre><code>&lt;div id="panel1"&gt;
  &lt;input type="button" id="addbut" value="Add it"&gt;&lt;/input&gt;
  &lt;/div&gt;
  &lt;div id="panel2"&gt;
  &lt;input type="button" id="addbut" value="Add it"&gt;&lt;/input&gt;
  &lt;/div&gt;
  &lt;div id="panel3"&gt;
  &lt;input type="button" id="addbut" value="Add it"&gt;&lt;/input&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>On click of button, i want to print id(or other attributes) of div in which this button is contained. In JQuery,</p>
  
  <pre><code>$("#addbut").click(function(){
   alert(ID of panel to which this button belong - this.?) &lt;-- Want to achieve
  });
  </code></pre>
  
  <p>If button in panel1 is clicked, then it should alert or consolelog id i.e panel1.</p>
  
  <p>I hope the question is clear.</p>