title: Get the first content of td via tr data-id
body: <p>I have the following HTML code:</p>
  
  <pre><code>&lt;tr data-id='23'&gt;
     &lt;td&gt;&lt;a href='../index.php?typeID=23'&gt;Title&lt;/a&gt;&lt;/td&gt;
     &lt;td&gt;&lt;a href='updateArticleType.php?typeID=23'&gt;Update&lt;/a&gt;&lt;/td&gt;
     &lt;td&gt;&lt;a href='#' data-toggle='modal' data-target='#myModal' class='warning-dialog' data-id='23'&gt;Delete&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt; 
  </code></pre>
  
  <p>And the following JQuery code:</p>
  
  <pre><code>$(function () {
      var lastClickId;
      $('.warning-dialog').click(function () {
          lastClickId = $(this).data("id");
          var str = $("tr[data-id='" + lastClickId + "']:first").text();
          alert(str);
      });
  </code></pre>
  
  <p>I need to get the <code>name</code> between the archos tags.</p>
  
  <p>I tried the code above, but in the alert is get <code>"Name Update Delete"</code>.</p>
  
  <p>My question is why it doesn't work and how can I fix it?</p>