i\'m a web devoper from Italy...I have a problem with loading with href example: i have one.html with this code
This is not an error. To understand this problem you must understand how jQuery Mobile works.
Multi HTML
template can't be mixed with multi page template. For example when working with several HTML
pages, only first one can have more then one page. When jQuery Mobile loads other HTML
files it will strip HEAD (we dont need it because first HTML
HEAD content is already loaded into the DOM) and it will load ONLY first page it can find in a file, every other page will be discarded.
data-prefetch
will not help you here. Also you are initializing it incorrectly, data-prefetch attribute don't have a value, it is just data-prefetch
, example:
<a data-role="button" data-theme="a" data-transition="fade" href="two.html" data-prefetch>Login</a>
If you want to find out more how jQuery Mobile handles multiple HTML and multiple page templates or what are they take a look at this ARTICLE or THIS one. To be transparent they are my personal blog articles. Everything you need to know can be found there.
Basically solution to your problem would be to have all pages inside a single HTML
file, or you should brake two.html into two separate HTML
files. you decide what is a best solution for you.