I m nt sure what this means :-
var $a = $(this);
Do the variable name should contain '$' in it ?
Here is an example of the ajax request to make through jQuery :-
$.ajax({
type: "POST",
url: "../WebMethods/WebService.asmx/GetData",
data: "{Id:'" + Id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function (response) {
var result = JSON.parse(response.d);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
ShowError(failMessage, 450, 100);
}
});
Hope this will be helpful for you.