Link not changing to a new "page" on the same HTML
in jQuery Mobile
•
10 years ago
The following link is supposed to go to a different "page" on the same HTML page, right? Well, right now the page "slides" and goes to the top of the same page, not to the new div. Please let me know if I am styling the link properly. Yes, I am reading the docs!
<li><a href="#aboutApp">About this App</a></li>
This is how the above "page" is styled, further down the HTML page:
<!-- Start of About this App -->
<div data-role="page" id="#aboutApp">
<div data-role="header">
<h1>About this App</h1>
</div><!-- /header -->
<div data-role="content">
<p>I'm first in the source order so I'm shown as the page.</p>
<p><a href="#home">Back to home</a></p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /footer -->
</div><!-- /page -->
The first "page" begins like this ...
<!-- Start of first page -->
<div data-role="page" id="home" data-theme="b">
<div data-role="header">
<h1>Setups</h1>
</div><!-- /header -->
<div data-role="content"><form name="form2">
... and ends like this (right out of the docs):
</form></div><!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div><!-- /footer --> </div><!-- /page -->
1