How does CSS work in JqueryMobile
In jqueryMobile, only the first page section seems to be loaded. When the user is redi开发者_开发问答rected to a second page, the of that page is added to the first page, no headers are loaded.
If that is correct, how do we manage CSS files in jQueryMobile? Do I need to specify ALL the website classes in just one file? or is there any way to tell jquerymobile to load the css required for each page?
Thanks!
jQuery Mobile will hijax all the links on the page by default, loading the content via ajax, and only add the <body>
of the response to the DOM. So, yes the easiest way is to load your required CSS up front in the first page. Bundle it and minify it to reduce the impact on the client.
精彩评论