[jQuery] Re: attaching hide() to delete confirmation

2009-01-05 Thread steve
thanks, Hector, your answer helped with what I'm trying to do now. On Nov 17 2008, 1:49 pm, Hector Virgen djvir...@gmail.com wrote: If the link is within the row, you can use jQuery#parents to find the row, without using the ID. $('a.delete').click(function() {    

[jQuery] Re: attaching hide() to delete confirmation

2008-11-19 Thread typenerd
This is what I ended up with: $('a.delete').click(function() { var msg = 'Are you sure?'; if (confirm(msg)) { $(this).parents('tr').hide(); } else { return false; } -- View this message in context:

[jQuery] Re: attaching hide() to delete confirmation

2008-11-17 Thread Hector Virgen
If the link is within the row, you can use jQuery#parents to find the row, without using the ID. $('a.delete').click(function() { $(this).parents('tr').hide(); }); I'm not sure what .confirm() is at the end your script, but if you want to use the native javascript confirm you can do it like