0

Im working on a JQuery Mobile App.

im using the Multipage template feature to navigate between content.

i can easily navigate between pages with an "a" tag using the div page ID ref...

<a href="#page2" />

if i have the following page stricture...

<div data-role="page" id="page1">

    <!-- content -->

</div>

<div data-role="page" id="page2">

    <!-- content -->

</div>

<div data-role="page" id="page3">

    <!-- content -->

</div>

how can i open page 2 using javascript rather than an a tag?

JGilmartin
  • 8,683
  • 14
  • 66
  • 85

1 Answers1

0

You can use $.mobile.navigate(). For example,

$.mobile.navigate("#page2");
Anid Monsur
  • 4,538
  • 1
  • 17
  • 24