$(function() {
$( "#datepicker" ).datepicker();
});
What they don't tell you is that this doesn't work properly if the page element on which the JQuery is acting is in an Update Panel control.
Fortunately there's a simple solution. Get a pagerequestmanager first, and use that to call the function. Again, the example is using the datepicker:
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_pageLoaded(LoadMe);
function LoadMe() {
$( "#datepicker" ).datepicker();
});