I\'ve picked up an existing project from another developer and ive noticed in the code that they are executing js code within three different event handlers...
f
$(document).ready()
Ideal for one time initialization.
Optimization black magic; may run slightly earlier than pageLoad().
Does not re-attach functionality to elements affected by partial postbacks.
pageLoad()
Unsuitable for one time initialization if used with UpdatePanels.
Slightly less optimized in some browsers, but consistent.
Perfect for re-attaching functionality to elements within UpdatePanels.