So I found the solution, callback function for when post or page is:
jQuery(document).on('heartbeat-tick.autosave', function( event, data ) {
// your code here
});
This uses the WordPress Heartbeat API.
So I found the solution, callback function for when post or page is:
jQuery(document).on('heartbeat-tick.autosave', function( event, data ) {
// your code here
});
This uses the WordPress Heartbeat API.