Software Archive
Read-only legacy content
17061 Discussions

from link href to a subpage

nicolas_r_
Beginner
321 Views

How can i go from a link with href to a subpage using ui framework jquery mobile 

0 Kudos
2 Replies
Wesley_S_1
New Contributor I
320 Views

Example multipage document:

    <div data-role="page" id="page1">
    <a href="#page2">Page 2</a>
    </div>

    <div data-role="page" id="page2">
  <a href="#page1">Page 1</a>
    </div>

https://demos.jquerymobile.com/1.4.5/navigation-linking-pages/ ;


Programmatically:
    $( ":mobile-pagecontainer" ).pagecontainer( "change", "#page1", {
                                                transition: "slide",
                                                reverse: false }
                                              );

 

0 Kudos
Chris_P_Intel
Employee
320 Views

Hi,

The short answer is: no.

jQuery Mobile supports pages, and App Designer exposes them as things you can directly link to with href, page transitions and more. Use the Interactivity pane to set those links up (or do it yourself in the code, if you prefer).

But the sub-pages are an App Designer construct, not jQueryMobile.  To link buttons to sub-pages use the Interactivity panel. That'll bind a button with an 'activate_subpage' script. Once AppDesigner adds the file with that script you can call it yourself  if you want.  But the sub-pages can't use the whole href="#subpage" thing.

Hope this helps,

Chris

0 Kudos
Reply