Tuesday, 10 September 2013

Jquery mobile, working with multiple pages

Jquery mobile, working with multiple pages

suppose I've following html along with jquery mobile linked:
<section id="firstpage" data-role="page">
<label for="a">Enter a</label>
<input id="a" type="number"/>
<label for="b">Enter b</label>
<input id="b" type="number"/>
<label for="c">Enter c</label>
<input id="c" type="number"/>
<a href="#secondpage" data-role="button" data-transition="flip">Show
Them!</a>
</section>
<section id="secondpage" data-role="page">
<!--I want to show the three values of a,b,c here -->
</section>
As you can see the first page will have a button, and when I'll press that
it'll direct me to the second page. Now, suppose I'm saving the input
field values to three variables in my script. How to show them in the
second page, I'm getting stucked at that?
If you just write a simple jquery script that will take these three values
in the first page and show them when directed in the second page in its
inner html, that'll work for me.

No comments:

Post a Comment