动态表完全加载后调用JS函数

I've got a dynamic table which is loading on document.ready, it gets it's data using $.get from a PHP file, which gets the data from an SQL database.

I want to run tablesorter once the entire page has loaded, I've tried a few things suggested on the internet, including $.when(call $.get function), but none of them have worked.

Is there any way I could call the function after the table has fully loaded?

Maybe I am not understanding the question correctly, but shouldn't you just use the success callback of the $.get() function to process the data you retrieved from your PHP?

There is also the .done() promise to check out as well.

https://api.jquery.com/jQuery.get/