To understand this situation you need to understand how jQuery Mobile works. It uses ajax to load other pages.
First page is loaded normally. Its HEAD and BODY is loaded into the DOM, and they are there to await other content. When second page is loaded, only its BODY content is loaded into the DOM.
To find out more and how to solve this problem (with solutions and examples) take a look at my other answer: Why I have to put all the script to index.html in jquery mobile