jquery find attribute id
<p>I have the following JavaScript code: </p>

<pre><code>$(function() {
var parent = '';
$('a.tip').click(function(e) {
e.preventDefault();
parent = $(this).parent();
$('#deletelink').dialog('open');
return false;
});
$('#deletelink').dialog({
autoOpen: false,
width: 300,
buttons: {
"Ok": function() {
$.ajax({
type: 'post',
url: 'asd',
data: 'ajax=1&amp;delete=' + parent.attr('id').replace('record-',''),
beforeSend: function() {
parent.animate({'backgroundColor':'#fb6c6c'},300);
},
success: function() {
parent.slideUp(300,function() {
parent.remove();
});
}
});
$(this).dialog("close");
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
});
</code></pre>

<p>Which I use with the following html code:</p>

<pre><code>    &lt;li class="odd"&gt;
    &lt;div class="avatar-container"&gt;
        &lt;div class="avatar"&gt;
            &lt;div class="imgDelete" id="record-1" style="text-align:center;"&gt;
                &lt;a class="tip" href="javascript:void(0);" title="This action cannot be undone!"&gt;&lt;span&gt;Delete&lt;/span&gt;&lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
 &lt;/li&gt;
&lt;li class="even"&gt;
    &lt;div class="avatar-container"&gt;
        &lt;div class="avatar"&gt;
            &lt;div class="imgDelete" id="record-2" style="text-align:center;"&gt;
                &lt;a class="tip" href="javascript:void(0);" title="This action cannot be undone!"&gt;&lt;span&gt;Delete&lt;/span&gt;&lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
 &lt;/li&gt;
</code></pre>

<p>The html code above is generated with php loop.</p>

<p>My problem is that when i click on "Delete" link, only parent div is slided up. I need to make it to slide up the whole <code>&lt;li&gt;</code>.
Any help?</p>
