My guess is you asked the wrong question
I guess, you want to start the page with hidden table
Two solutions I will suggest.
1 add style in the table
<TABLE style="display:none">
2. Add another statement in $(document).ready()
$(document).ready(function() {
$(".table_bg").hide();
...
}