jquery passing data from table row to functions
<p>I'm using this method for years and I don't know if this a good idea. How you proceed if you want to pass data to a functions?</p>

<p>For example, passing a string data to jquery .hover event:</p>

<pre><code>&lt;table&gt;...

&lt;tr class='my_row' id='uniqueid_param1_param2_param3'&gt;
   &lt;td&gt;Some value #1&lt;/td&gt;
   &lt;td&gt;Some value #2&lt;/td&gt;
   ...
   &lt;td&gt;Some value #n&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>And within jQuery:</p>

<pre><code>$('.my_row').hover(function(){
   var param = $(this).attr('id').split('_');

   param[1]; // param1
   param[2]; // param2
   param[3]; // param3
});
</code></pre>

<p>There are advantages and disadvantages, I won't enumerate them, but I will write another example how normal people, or how I think others are using:</p>

<pre><code>&lt;table&gt;...

&lt;tr class='my_row'
      onmouseover="handle_param('param1', 'param2', 'param2');"
      onmouseout="handle_param('param1', 'param2', 'param2');"&gt;
   &lt;td&gt;Some value #1&lt;/td&gt;
   &lt;td&gt;Some value #2&lt;/td&gt;
   ...
   &lt;td&gt;Some value #n&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>And within js:</p>

<pre><code>function handle_param(param1, param2, param3){
  //...
}
</code></pre>

<p>I don't like this method, if you have many many rows this wouldn't be a good ideea.</p>

<p>So, how do you proceed? How you would do it if you have to pass data to a functions?</p>
