I have a button click on which i have to call a webmethod and on success of the method, i need pass the parameter "this" to the function.
$(".login").click(function () {
var parent = $(this).parent().parent();
var id = $(parent).find(".selectbtn").attr("id");
PageMethods.validateLogin(id, onSuccess, null);
});
function onSuccess(result) {
if (result) {
//here i need to delete the parent div, that is var parent = $(this).parent().parent();
}
}
Any suggestions?