execute javascript when a usercontrol become visible
<p>I have a usercontrol wich is visible=false when the page is loaded.
Then, it becomes visible=true.
I want some javascript to be executed when this usercontrol is set to visible=true in the code-behind.
the only solution i found is to use ScriptManager.RegisterStartupScript in the </p>

<p>usercontrol's code behind.
But i don't like writing my javascript in the codeBehind.</p>

<p>This jQuery in the usercontrol doesn't work :
$(document).ready(function() {
 alert('test');
});</p>

<p>The usercontrol is into an updatepanel.</p>
