user1427468
user1427468

Reputation: 133

jquery mobile anchor links in a page

I would like to link different parts of an html page by using anchor tags and ids in jQuery mobile framework. But it doesn't seem like working like in usual html tags. Here's the code that I tried. Any tips will be appreciated!

<div data-role="page">
...
<p> text continues..... 
<id="1"> more text continues..... 
<id="2"> more text continues..... 
<id="3"> more text continues..... 
<id="4"> more text continues..... 
</p>
...
<a href="#1" data-ajax="false">find #1</a>
<a href="#2" data-ajax="false">find #2</a>
<a href="#3" data-ajax="false">find #3</a>
<a href="#4" data-ajax="false">find #4</a>
</div>

Upvotes: 1

Views: 3127

Answers (1)

ahren
ahren

Reputation: 16961

<id> isn't a valid html tag.

You should be using <a name="one"> as your anchor, and then <a href="#one"> as your link.

Upvotes: 2

Related Questions