title: Inline edit in table with edit button jquery
body: <p>Following sample code is for making a row editable with edit button.Totally I have 3 buttons,Initially I am hiding the update button.When I click edit button inline edit should be enabled and when I click update inline edit should be disabled.<br>
  I wrote the below code and I am unable to find it what I did wrong?</p>
  
  <pre><code>$('.edit').click(function(){
          var currentTD = $(this).parents('tr').find('td');
          if ($(this).html() == 'Edit') {
              currentTD = $(this).parents('tr').find('td');
              $.each(currentTD, function () {
              $(this).prop('contenteditable', true)
              });
          } else {
              $.each(currentTD, function () {
              $(this).prop('contenteditable', false)
              });
          }
          });
  </code></pre>
  
  <p>Complete code: <a href="https://jsfiddle.net/xcmvzpuk/" rel="nofollow noreferrer">Fiddle</a>. 
  Main thing is I am using dynamic data so if I click edit only selected row sholuld be able to enable.please Let me know what I did wrong</p>