I am new to jquery and am trying to trouble shoot some code and i have come across the following:
jQuery.get( url , { valids : val } , function( data ) {
if(data == 'success') {
$("#asearch_form").submit();
alert('Record Updated Successfully');
}else{
alert('Something went wrong');
}
});
Can someone please tell me what the "function (data)" part of this code means? Is (data) a user created or is it a built in jquery function? I see that data is tested to see if it equals success or error but I don't see where "data" is set to either success or error.