Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'd suggest using something along these lines:</p> <pre><code>$('table td').blur( function(){ var row = $(this).closest('tr').index(), col = $(this).index(), table = $(this).closest('table'); $('table') .not(table) .find('tr:eq(' + row + ')') .find('td:eq(' + col + ')') .text($(this).text()); });​ </code></pre> <p><a href="http://jsfiddle.net/davidThomas/p6pTq/" rel="nofollow">JS Fiddle demo</a>.</p> <hr /> <p><strong>Edited</strong> based on the comment by the OP that:</p> <blockquote> <p>its a normal <code>table</code> with <code>input</code>s so nothing special.</p> </blockquote> <pre><code>$('table input').blur( function(){ var row = $(this).closest('tr').index(), col = $(this).closest('td').index(), table = $(this).closest('table'); $('table') .not(table) .find('tr:eq(' + row + ')') .find('td:eq(' + col + ') input') .val($(this).val()); });​ </code></pre> <p><a href="http://jsfiddle.net/davidThomas/p6pTq/2/" rel="nofollow">JS Fiddle demo</a>.</p> <p>References:</p> <ul> <li><a href="http://api.jquery.com/blur/" rel="nofollow"><code>blur()</code></a></li> <li><a href="http://api.jquery.com/closest/" rel="nofollow"><code>closest()</code></a>.</li> <li><a href="http://api.jquery.com/eq-selector/" rel="nofollow"><code>:eq()</code> selector</a>.</li> <li><a href="http://api.jquery.com/find/" rel="nofollow"><code>find()</code></a>.</li> <li><a href="http://api.jquery.com/index/" rel="nofollow"><code>index()</code></a>.</li> <li><a href="http://api.jquery.com/text/" rel="nofollow"><code>text()</code></a>.</li> <li><a href="http://api.jquery.com/val/" rel="nofollow"><code>val()</code></a>.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload