The following code snippet results in a javascript error pointing at the line 'fail: function()' The error is: Uncaught SyntaxError: Unexpected identifier and also fails in Firefox
$.ajax(
{
type:"post",
url: "http://hdkumdo.com/gumdo/manage_members/view",
data:{ email:email},
done:function(response)
{
console.log('Done' + response);
}
fail: function()
{
console.log('Failed');
}
});
The full function below works when the ajax code is commented out:
$( ".row_button" ).click(function() {
var email= "hello" ;
$('#membertbl').find('tr').click( function(){
var ID = $(this).find('td:first').text();
console.log('You selected ID: ' + ID);
/* $.ajax(
{
type:"post",
url: "<?php echo base_url(); ?>manage_members/view",
data:{ email:email},
done:function(response)
{
console.log('Done' + response);
}
fail: function()
{
console.log('Failed');
}
}); */
});
});