title: Getting Id with jquery for jeditable
body: <p>I've been making a site and am now working on the administration part of it so that users can easily be managed, articles easily modified etc.
  I wanted to use jeditable so that the admin would be really easy to use.</p>
  
  <p>Part of JEditable is working (the p tags are becoming inputs) however I'm having trouble sending the id of the product through the ajax request.</p>
  
  <p>Here's the html code I currently have (generated by php):</p>
  
  <pre><code>    &lt;table class="admin_list"&gt;
          &lt;tr&gt;
              &lt;th style="width: 110px;"&gt;First Name&lt;/th&gt;
              &lt;th style="width: 110px;"&gt;Last Name&lt;/th&gt;
              &lt;th style="width: 100px;"&gt;Date of Birth&lt;/th&gt;
              &lt;th style="width: 200px;"&gt;Email&lt;/th&gt;
              &lt;th style="width: 140px;"&gt;Address&lt;/th&gt;
              &lt;th style="width: 112px;"&gt;Postal Code&lt;/th&gt;
              &lt;th style="width: 112px;"&gt;Town&lt;/th&gt;
              &lt;th style="width: 120px;"&gt;Country&lt;/th&gt;
              &lt;th style="width: 115px;"&gt;Login&lt;/th&gt;
              &lt;th style="width: 42px;"&gt;Action&lt;/th&gt;
          &lt;/tr&gt;
  
          &lt;tr class="2"&gt;
              &lt;td&gt;&lt;p class="editable"&gt;Another&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;User&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;11/11/1911&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;user@email.com&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;Address&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;56130&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;Town&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;2&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;bob&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;a href="http://localhost/monline/private_html/musiconline/?delete/user/2"&gt;D&lt;/a&gt;
                  &lt;a href=""&gt;U&lt;/a&gt;
                  &lt;a href=""&gt;D&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr class="1"&gt;
              &lt;td&gt;&lt;p class="editable"&gt;Daniel&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;Lucas&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;10/04/1990&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;dan@email.com&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;myAddress&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;12345&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;myTown&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;8&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;&lt;p class="editable"&gt;dan&lt;/p&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;a href="http://localhost/monline/private_html/musiconline/?delete/user/1"&gt;D&lt;/a&gt;
                  &lt;a href=""&gt;U&lt;/a&gt;
                  &lt;a href=""&gt;D&lt;/a&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  
      &lt;input type="text" class="edit_id" value="" /&gt;
  </code></pre>
  
  <p>Here's the jquery I've written:</p>
  
  <pre><code>    $( function() {
          $('.admin_list tr').hover( function() {
              $('.edit_id').attr( 'value', $(this).attr('class') );
          });
  
          $('.editable').editable("http://localhost/monline/private_html/musiconline/?admin/edit/users/" + $('.edit_id').attr('value'), {
              indicator : 'Saving...',
              onblur : 'submit',
              method : 'PUT'
          });
      });
  </code></pre>
  
  <p>As you can see I'm getting the ID of the current row when the mouse hovers over (which I would like to avoid), however when I submit the page the ID is not being set in the jeditable url.</p>
  
  <p>Does anyone know how this can be sorted as I would like to use an in-place editor for the admin panel?</p>
  
  <p>As an optional request how could I get the class of the tr surrounding the input that's been clicked on? I've tried something along the line of $(this).parent().parent().attr('class')</p>
  
  <p>Thanks
  Dan</p>