title: Getting the parent id of an element
body: <p>I have troubles to get the parent id of  elements.</p>
  
  <pre><code>$(function(){
  $("#elem-132224").append("&lt;button class='sum'&gt;+&lt;/button&gt;&lt;button&gt;-&lt;/button&gt;")
  $(".sum").click(function(){
      alert($(this).attr('id'));
  })
  </code></pre>
  
  <p>why is not working?</p>