html - Display new page in jquery mobile through button click -
I am using jQuery mobile and when I click on the button try to display the second page / div I am doing How do you use the button properly? Do I need to link to a JavaScript function somehow?
& lt; Body & gt; & Lt; Div data-role = "page" id = "pageon" & gt; & Lt; Div data-role = "main" square = "ui-content" & gt; & Lt; Form & gt; & Lt ;! - Some text boxes - & gt; & Lt; Button onclick = "store ()" a href = "# pagetwo" type = "button" id = "savebtn" & gt; Store the data and give it & lt; / Button & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div data-role = "page" id = "pagetwo" & gt; & Lt; Div data-role = "main" square = "ui-content" & gt; & Lt ;! - Performance graphs with textbox data - & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt;
- First, store data function store () {$. Ajax ("Url:" data collection ", success: function () {$ (" body "). Page Container (" Change ", $ (" # pagetwo "), {Infection:" Slide "}}}}} }}
- Take the page to your other page on success in the example code above
- On your second page you will need to get the data you saved < / Ol>
Comments
Post a Comment