tags:

views:

21

answers:

1

hey guys

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 ?

+2  A: 

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' } );
  });
 });
});
Sarfraz
it works gently , tanx man
Mac Taylor
@Mac Taylor: You are welcome. :)
Sarfraz