I am trying to figure out, whats I am doing wrong in following code:
$(function() {
$(".alert").live('click', function(){
var id = $(this).closest("tr").attr("id")
var info = 'id=' + id;
$.ajax({
type: "POST",
url: "http://localhost/app/ajax.php?act=alert",
data: info,
success: function(Response){
}
});
alert(Response);
$(this).hide();
return false;
});
});
Return false is not working.
HTML code:
<a href="#" class="alert">Alert</a>
Responseis not defined (so it throws an error. Look at the console.