title: How to get the table row td's value that has a row span column
body: <p>I have a table with rowspan as a starting column. The table has a button at the end of each row. When the button is clicked, the corresponding rows values should be retrieved.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;title&gt;JS Bin&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;table border="1" style="text-align:center" &gt;
      &lt;tr&gt;
        &lt;th&gt; Col 1 &lt;/th&gt;
        &lt;th&gt; Col 2 &lt;/th&gt;
        &lt;th&gt; Col 3 &lt;/th&gt;
        &lt;th&gt; Get Row Values &lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td rowspan="2" class="col1"&gt; 1 &lt;/td&gt;
        &lt;td class="col2"&gt; 2 &lt;/td&gt;
        &lt;td class="col3"&gt; 3 &lt;/td&gt;
        &lt;td&gt; &lt;button class="get-value"&gt; Alert values &lt;/button&gt; &lt;/td&gt;
     &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td class="col2"&gt; 5 &lt;/td&gt;
        &lt;td class="col3"&gt; 6 &lt;/td&gt;
        &lt;td&gt; &lt;button class="get-value"&gt; Alert values &lt;/button&gt; &lt;/td&gt;
     &lt;/tr&gt;    
    &lt;/table&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script&gt;
    $('.get-value').on("click",function(){
         var col1val = $(this).parents('tr').find('.col1').text();
         var col2val = $(this).parents('tr').find('.col2').text();
         var col3val = $(this).parents('tr').find('.col3').text();
         alert("Col1 :" + col1val + " Col2 :" + col2val + " Col3 :"+ col3val);
    });
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When the first row button is clicked, it is retrieving all the three columns values. But when the second row button is clicked, the rowspan column value could not be retrieved.</p>