I would be more helpful if you have given me table format. I suppose ur table
is of this format.
<table id="tableId">
<tr><td>blah</td></tr>
<tr><td>blah</td></tr>
<tr><td>blah</td></tr>
</table>
try this..
if( $('#tableId tbody tr#ticket_10192').length ) {
                 // element Exists, delete it
                $('#tableId tbody tr#ticket_10192').remove();

                }


ethanpil wrote:
> 
> 
> Hi,
> I know everyone here is busy, and this is probably a stupid
> newbiequestion, but I would aprreciate a point in the right
> direction...
> 
> I am trying to delete a table row that I have created with JQuery:
> Everything works until I click the Close link inside the new table
> row, then nothing happens. I have spent 3 or 4 hours trying different
> variations of getting that close link to generate an event, but I cant
> even get it to give me an alert or anything else....
> 
> 
> <SCRIPT LANGUAGE="JavaScript">
>       //JQuery Commands
>       $(document).ready(function(){
> 
> 
>       var newrow ='<tr id="ticket_10192" class="ticket_info"><td
> colspan="5" scope="row"><center>New Row</center><br><p align=right"> #
> Close </p></td></tr>';
> 
> 
>                $('#10192').click(function(){
>               var e
>               if( (e=$('#ticket_10192')).length ) {
>                // element Exists, delete it
>               $('#ticket_10192').remove();
> 
>               } else {
>               //Doesnt exist, create it
>               $(this).after(newrow);
>               }
>                });
> 
>               $('a.close_ticket').click(function(){
>                   $('#ticket_10192').remove();
>               });
>       });
> 
> </SCRIPT>
> 
> Thanks for your time.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trouble-Deleting-Table-Rows-tf4311391s15494.html#a12282115
Sent from the JQuery mailing list archive at Nabble.com.

Reply via email to