jquery - Background Color animation doesn't display on <tr> -


i have weird problem, try make animation on tr , doesn't execute on specific page.

i use twice, worked on page , didn't on second, script same (parent change because of dom structure)

 $("#ajax button.delete").on("click", function(){     var name = this.name,         value= this.value;         var parent = $(this).parent().parent().parent();         $.ajax({           type: 'get',           url: 'deletecategory.php',           data: 'delete=' + $(this).val(),           beforesend: function() {             $('td', parent).animate({"background-color":'#fb6c6c'}, 300);           },           success: function() {             parent.remove();           }         });   }); 

in script parent variable tr tag.

and tr tag filled :

 <tr>     <td><span id="tcat{$data->cid}">{$data->name}</span>         <div class="btn-group pull-right">             <button id="ecat{$data->cid}" name="category" value="{$data->cid}" class="edit btn"><i class="icon-edit"></i> modifier</button>             <button id="dcat{$data->cid}" name="category" value="{$data->cid}" class="delete btn btn-danger"><i class="icon-trash"></i> supprimer</button>         </div>     </td> </tr> 

so in fact animation not displayed , remove() done immediately.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -