javascript - Jquery animation work only first time -


i have ajax load page after completion of ajax animate div (parent of changing content) animate once(first time). can give me description error or other way this.

my code:

$.ajax({     type: "post",     url: "page.php",     data:'', //data     success: function(data){         $('#last_saved_text').html(displaycurrenttime()); /* below animation work once*/         $('#last_saved_text').parent('div').animate({'background-color':'rgb(212, 72, 54)'},{             duration: 1500,             complete: function(e){                  $('#last_saved_text').parent('div').css('background-color','rgb(249, 249, 249)');}         });      },     fail: function( jqxhr, textstatus ) {} }); 


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -