I’ve editing this original question as I think I’ve narrowed down the problem…
I have one view in my site that will not let me put $document.ready within a masterpage contentplaceholder. I’ve stripped this page to the bare bones and the only thing that is special about it is it has a custom route in global.asax
routes.MapRoute('Books', '{controller}/{action}/{keywords}/{pageNumber}', new { controller = 'Books', action = 'SearchResults' } );
Any idea why this custom route would stop $document.ready working correctly when put in a masterpages contentplaceholder zone?
I had the same problem and it turned out that when I used a certain route it changed the perceived file hierarchy of the site such as the ../../Content link for the .js file didn’t work any more. I fixed it by changing my jquery script reference to look like this: