fire event or action sequence when component is rendered

I want to run an action sequence or some javascript each time a template component is rendered. Anyone have ideas on how to do that?

bump

Do not call myself an expert in these things. But some googling provides this idea:  https://stackoverflow.com/questions/1225102/jquery-event-to-trigger-action-when-a-div-is-made-visible

If your code is listening to the show event of the template DOM ID - you could trigger the rest of your JS. 

Maybe??