Hi everyone, I'm using jquery confirm to change a link into a confirm delete
yes/no. That's working great, but I'm having trouble handling deleting the
row in html; I'm not sure how to reference the id for the row.

My html looks like this, with each TR having a unique row id:

<tr id="r3">
cell data...
</tr>


my delete link looks like this:

delete/3 delete row 3 


my jquery looks like this, but I don't know how to reference the id=r3 using
javascript:

<script type="text/javascript">
$(document).ready(function() {
$('a.delete').click(function(event) {
        $.post($(this).attr('href'), function(data){
                link_id = $(this).id();
                row_id = link_id.replace('d', '');
                $("#r"+row_id).hide();
        });
}).confirm();
});
</script>
-- 
View this message in context: 
http://www.nabble.com/attaching-hide%28%29-to-delete-confirmation-tp20548833s27240p20548833.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to