Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think I understand but feel free to comment if I'm misunderstanding your question.</p> <p>I believe you're misunderstanding how internal JQuery linking works. First thing is take a look at the JQuery Mobile page anatomy, especially at the "Multi-page template structure" in your case: <a href="http://jquerymobile.com/test/docs/pages/page-anatomy.html" rel="nofollow">http://jquerymobile.com/test/docs/pages/page-anatomy.html</a></p> <p>Basically every "embedded in the middle of page" section of your page will need to be a stand alone div marked with the <code>data-role="page"</code> tag. Its ID is going to be what you'll point an anchor to. </p> <p>So in order for your internal <code>&lt;a href="#jib"&gt;</code> to work you have to have a built in div with ID = "jib"</p> <p><strong>UPDATED ANSWER AFTER COMMENTS</strong></p> <p>What you're looking for is <code>$.mobile.silentScroll</code> . You want to get your anchor link's Y-position and then have the page scroll to it. There is a little gotcha though. You'll need to add a little pause before the scroll happens because of the JQuery Mobile animations that happen on page transition.</p> <pre><code>function loadJib() { $.mobile.changePage('#jib',{transition:"slide"}); var yPos = $('#mylink').get(0).offsetTop; setTimeout(function(){ $.mobile.silentScroll(yPos); },800); </code></pre> <p>Take a look how I did it ( .8 second delay ).:</p> <p><a href="http://jsbin.com/ahevav/3/edit" rel="nofollow">http://jsbin.com/ahevav/3/edit</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload