I have a page that contains a user control within an update panel. $(document).ready(function() ) { is called and executes the code correctly when the page firs
$(document).ready(function() ) {
Instead of $(document).ready you could use function pageLoad(){}.
$(document).ready
function pageLoad(){}
It's automatically called by the ScriptManager on a page, even on a postback.
ScriptManager