Reputation: 5158
im trying to impelement a technique to delete stories with jquery animation exactly like wordpress
this is my script part :
$(function(){
$('#jqdelete').click(function() {
$(this).parents('tr.box').animate( { backgroundColor: '#cb5555' }, 500).animate( { height: 0, paddingTop: 0, paddingBottom: 0 }, 500, function() {
$(this).css( { 'display' : 'none' } );
});
});
});
but not working am i wrong in any part of my code ?
Upvotes: 0
Views: 39
Reputation: 382796
If there are multiple delete links, you should use a class
instead of an id` for delete links:
<a href='javascript:void(0)' class='jqdelete'>
$(function(){
$('.jqdelete').click(function() {
$(this).parents('tr.box').animate( { backgroundColor: '#cb5555' }, 500).animate( { height: 0, paddingTop: 0, paddingBottom: 0 }, 500, function() {
$(this).css( { 'display' : 'none' } );
});
});
});
Upvotes: 2