Call a jQuery Function with onClick event of Image Button
<p>I have a form in which a table of dynamic data is built with PHP.  Within each row is an image that when clicked calls a jQuery function with a click event.</p>

<p>For example, if the image has an id of eventnfo_0, i have a function like this:</p>

<pre><code>$("#eventnfo_0").click(function()
</code></pre>

<p>It all works fine as long as I have a defined click event for each row.  The problem is, I need to make it dynamic because the number of rows can vary so it's not feasible to build a separate function as depicted above for each row.</p>

<p>My thought is there must be a way to call a jQuery function from an onclick event and pass a row number, but thus far, no dice.</p>

<p>I'm sure it's not an uncommon task, but I've not had any luck with my searches.</p>

<p>Any thoughts are appreciated.</p>
