Your source code should work fine, but you did not add a second pair of parentheses to call the anonymous function. If at the bottom of the page, the corresponding part of the DOM will be ready by then, making jQuery even more unnecessary.
;(function () { $('#searchbox').focus(); })();
Should work just fine
source share