title: How to get current row cell value
body: <p>I add following button to each row in the table in <code>showPosition</code> function. </p>
  
  <pre><code>&lt;button class="btn btn-primary" id="showOnMap" onclick="locateOnMap()"&gt;Show on Map&lt;/button&gt;
  </code></pre>
  
  <p>In following <code>locateOnMap</code> function I need to get second and third cell value of current row.</p>
  
  <pre><code>function locateOnMap() {
              alert($(this).closest('tr').find('td').eq(1).text());
          }
  </code></pre>
  
  <p><code>showPosition</code> method runs continuesly and add multiple rows.</p>
  
  <pre><code>function showPosition(position) {
      var table = document.getElementById("gpstable");
                  var row = table.insertRow(1);
                  var cell1 = row.insertCell(0);
                  var cell2 = row.insertCell(1);
                  var cell3 = row.insertCell(2);
                  var cell4 = row.insertCell(3);
                  cell1.innerHTML = Date();
                  cell2.innerHTML = position.coords.latitude;
                  cell3.innerHTML = position.coords.longitude;
                  cell4.innerHTML = "";
                  var bt = document.getElementById("showOnMap").cloneNode();
                  var cell5 = row.insertCell(4);
                  cell5.appendChild(bt);
  }
  </code></pre>