how to get a value of parent id with jquery
<p>This is the html i am using</p>

<pre><code>    &lt;tr&gt;
 &lt;td&gt;No.&lt;/td&gt;
 &lt;td id="2" class="editable"&gt;data1&lt;/td&gt;
 &lt;td id="2" class="editable"&gt;data2&lt;/td&gt;
 &lt;td&gt;Usage Left&lt;/td&gt;
 &lt;/tr&gt;
    &lt;!-- Multiple rows with different ids --&gt;
</code></pre>

<p>and this is my javascript</p>

<pre><code>    $(function(){

 $('.editable').editable({onSubmit:Update});

 function Update(){
  var id = $(this).parent('td').attr('id');
  var title = $(this).text();

  $.ajax({
        type: 'post',
        url: 'update.php',
        data: 'title=' + title + '&amp;id=' + id,

        success: function(response) {             
            $('#response').fadeIn('1000').empty().append(response);
        }
  });

 }
 });
</code></pre>

<p>I want to get the value of the ids of class editable, this is a inline edit plugin i am using i am able to collect the data1 and data2 values but for id i am getting undefined.</p>

<p>What is wrong with my code.</p>

<p>Thank You.</p>
