I have the following:
$('#EID').change(function () {
$.ajax({
url: "/Administration/stats",
data: { DataSource: $('#DataSource').val(),
EID: $('#EID').val()
},
success: function (data) {
$('#TID').html(data);
}
});
});
This works good but I want to be able to call the function () at other times and not just when EID changes. Can someone show me how I can pull out the function code into a separate block with a name and then call that function name.