Can anyone help me with my issue related to using Ajax to fadeIn a background color in beforeSend and fadeOut in success? I seem to have made some mistakes but can't figure out what went wrong.
var data={
action: 'tag_user_update',
postSearchNonce : MyAjaxSearch.postSearchNonce,
tag : $(this).closest("a").text(),
users_id : $("#users_id").val()
}
$.ajax({
url: MyAjaxSearch.ajaxurl,
type:'POST',
cache: false,
data:data,
beforeSend: function() {
$('.tag_link').animate({ backgroundColor:'yellow'},'slow');
},
success: function(data){
$('.tag_link').animate({ backgroundColor:'white'},'slow');
}
});//ajax