Solved

JQuery Mobile pageChange() Question

Posted on 2012-04-08
4
810 Views
Last Modified: 2012-06-21
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
Comment
Question by:wsessoms
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37824004
What is the complete html.
We can only see page 2 now
0
 
LVL 25

Expert Comment

by:kevp75
ID: 37824113
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
 

Accepted Solution

by:
wsessoms earned 0 total points
ID: 38068390
I found the solution. mistake was in the syntax:
$.mobile.changePage($("#page2"),{transition:"slideUp"});
changed to
$.mobile.changePage("#page2");
0
 

Author Closing Comment

by:wsessoms
ID: 38087022
Simple mistake
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question