I'm trying to reinvoke the code inside the document's ready() function inside an ajax callback. Is this possible?
$(document).ready(function() {
// page initialization functions
alert('hi');
});
// this gets called from a button click on the screen
function reauth() {
// logic here omitted for brevity
$.post("/Base/reauth", $("#reauthForm").serialize(), function(data) {
if (data.result != null) {
$(document).ready(); // <-- this does not invoke the alert('hi');
}
});
}