Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 848
  • Last Modified:

JQuery Mobile pageChange() Question

Can one of the experts give me an example of how to programically change the page using a multi-page jquery mobile template.when it change to page2 the page is blank. Your help is appreciated. This is my code.

JQuery SCRIPT

<script>
      $.mobile.changePage($("#page2"),{ransition:"slideUp"});
</script>

HTML

<div data-role="page" id="page2">
      <div data-role="header">
            <h1>Page 2</h1>
      </div>
      <div data-role="content">      
            My Content            
      </div>
      <div data-role="footer">
            <h4>Page Footer</h4>
      </div>
</div>
0
wsessoms
Asked:
wsessoms
  • 2
1 Solution
 
Michel PlungjanIT ExpertCommented:
What is the complete html.
We can only see page 2 now
0
 
kevp75Commented:
are you absolutely sure you are including the proper javascripts?  Are they the latest versions?

Please post the rest of your html for this document.
0
 
wsessomsAuthor Commented:
I found the solution. mistake was in the syntax:
$.mobile.changePage($("#page2"),{transition:"slideUp"});
changed to
$.mobile.changePage("#page2");
0
 
wsessomsAuthor Commented:
Simple mistake
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now