converting function to jquery click() call
<p>Here is the code that I'm trying to convert:</p>

<pre><code>&lt;script&gt;
function fsomething(rowid) {
   window.location = "/somewhere/" + rowid;
}

&lt;/script&gt;
&lt;tr&gt;
  &lt;td&gt;
      &lt;button onClick="fsomething('{{rowid}}')"&gt;row 1L&lt;/button&gt;
  &lt;/td&gt;
  &lt;td&gt;
      &lt;button onClick="fsomething('{{rowid}}')"&gt;row 2L&lt;/button&gt;
  &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>How can I convert this to:</p>

<pre><code>$('button').click(function() { .... } );
</code></pre>

<p>where <code>{{rowid}}</code> is dynamically generated, and unique to each row?</p>
