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>
wsessomsAsked:
Who is Participating?
 
wsessomsConnect With a Mentor Author Commented:
I found the solution. mistake was in the syntax:
$.mobile.changePage($("#page2"),{transition:"slideUp"});
changed to
$.mobile.changePage("#page2");
0
 
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:
Simple mistake
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.