addClass is not adding class to tr
I am using following ajax request...
$.ajax({
type: "POST",
async : false,
url: req_url,
data : {
id : account_id
},
success : function(data) {
if(data == 'banned'){
$(this).closest('tr').addClass('danger');
alert('updated');
}
else{
alert(data);
}
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert(XMLHttpRequest + " : " + textStatus + " : " + errorThrown);
}
});
$('.act').live('click', function(){
But its not adding danger class to tr on success, please help me to
resolve, thanks.
No comments:
Post a Comment