Thanks Ben, works perfectly!

On Jul 2, 6:12 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Phil,
> This is what I have and get the appropriate rowid in the alert:
>
> <script>
> $(function() {
>     for (i=0; i<5; i++) {
>         var row_id = 'row' + i;
>         var rw = '<tr id="' + row_id + '"><td>row ' + i + '</td></tr>';
>          $('#t1').append (rw);
>          $('#t1 tr#' + row_id).click( function(){
>                 alert($(this).attr('id'));
>                 alert(this.id);
>         });
>     }});
>
> </script>
>     <table>
>         <tbody id="t1"></tbody>
>     </table>
>
> I am sure you already knew this, but you have to have the tbody in there, at
> least that is what I figured out from my past experience.

Reply via email to