title: How to make an editable table in MVC using jquery?
body: <p>I am building my first MVC application using "database first" approach, everything works fine, however, I'm stuck at the point of using jQuery to make the MVC tables editable (inline), every row has a link when I click on that 
  link, the scenario should be as follows:-<br></p>
  
  <p>1-click on the link in a specific row <br>
  2-get this specific row editable</p>
  
  <p>the problem is as follows :-<br>
  1-when I click on the link of a specific row<br>
  2-all rows become editable !!! </p>
  
  <p>Here is the HTML code :-</p>
  
  <pre><code>&lt;table id="my_table"&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      @Html.DisplayNameFor(model =&gt; model.AFECode)
                  &lt;/th&gt;
                  &lt;th&gt;
                      @Html.DisplayNameFor(model =&gt; model.Remarks)
                  &lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt;
              &lt;/tr&gt;
  
              @foreach (var item in Model)
              {
                  &lt;tr contenteditable="false"&gt;
                      &lt;td contenteditable="false"&gt;
                          @Html.DisplayFor(modelItem =&gt; item.AFECode)
                      &lt;/td&gt;
                      &lt;td contenteditable="false"&gt;
                          @Html.DisplayFor(modelItem =&gt; item.Remarks)
                      &lt;/td&gt;
                      &lt;td contenteditable="false"&gt;
                          &lt;a id="edit_link" href="#" onclick="edit()" &gt;edit&lt;/a&gt;
              }
  
          &lt;/table&gt;
  </code></pre>
  
  <p>Here is the Jquery code including <code>edit()</code> function:-</p>
  
  <pre><code>function edit() {
      $("#my_table td").attr("ContentEditable") == "false" ? $("#my_table td").attr("ContentEditable", "true") : $("#my_table td").attr("ContentEditable", "false")
  }
  </code></pre>
  
  <p>Now , how can i only get the row that has the link i clicked on to be editable?<br>
  thanks in advance</p>