javascript - Jquery mobile pages navigation -
I am trying to develop a mobile app using phonegap and jQuery mobile. My problem is that pages do not change when events are triggered Here is the page and code code:
Not working between navigation pages
I think Your form is being triggered to reload your operation. Take a look at this demo where I've changed the form code so that it can take an empty action.
HTML:
& lt; Div id = "deviceready" data-role = "page" & gt; & Lt; Div data-role = "header" & gt; Header & lt; / Div & gt; & Lt; Div role = "main" square = "ui-content" & gt; & Lt; Form action = "javascript: zero (0);" & Gt; & Lt; Label = "username" & gt; Username: & lt; / Label & gt; & Lt; Input name = "user name" id = "user name" value = "" type = "article" /> & Lt; Label = "password" & gt; Username: & lt; / Label & gt; & Lt; Input name = "password" id = "password" value = "" type = "password" /> & Lt; Button ID = "submit-login" class = "ui-btn ui-shadow ui-corner-all-ui-btn-icon-left ui-icon-user" & gt; Login & lt; / Button & gt; & Lt; / Form & gt; & Lt; / Div & gt; & Lt; Div data-role = "footer" & gt; Footer & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "formResults" data-role = "page" & gt; & Lt; Div data-role = "header" & gt; Header & lt; / Div & gt; & Lt; Div & gt; Hello from success & lt; / Div & gt; & Lt; Div data-role = "footer" & gt; Footer & lt; / Div & gt; & Lt; / Div & gt;
Comments
Post a Comment