• flickr
  • linkedin
  • twitter
  • rss
Dialog pages not working on more than one page in jQuery mobile

Dialog pages not working on more than one page in jQuery mobile

I’m a novice in jQuery mobile, this had me stumped. Everything would work fine on one page, but once I navigated between pages, my dialog pages would fail to open.

Turns out, if you’re doing internal linking on one page, you need to turn off ajax for navigating to the new page. Ajax loads with #’s, as do your internal links. So they get all mixed up – you need to turn ajax navigation OFF in your links so that, on your new page, the #’s refer to your internal links, not ajax stuff. (I’m so technical!)

So! To keep your internal dialog links working, turn the Ajax page transition off getting to the page –

<a href="page7.html" data-icon="forward" data-ajax="false">Next</a>

You lose the nice page transitions having to do this – but it works so that’ll do. Work-arounds could include having no internal page linkages at all, or having one enormous html file with all your pages and dialogs on it.


SeeĀ http://demos.jquerymobile.com/1.2.0/docs/pages/page-links.html for more details (Linking within a multi-page document)

Tech Reference:

Larry's a 30-something chap interested in travel, being a dork and changing the world via less boring training.

Leave a reply