You are probably not going to be very successful getting javascript into the body, plus it doesn't make logical sense because you would have to constantly repeat it.
You could modify the page widget or create a custom one that uses JQuery to wire up behaviors and then just use the appropriate classes/ids when generating content. Provided the table has rendered, your jquery should be able to tie in. This means a widget after the page widget or after the content is rendered in the page widget.