javascript - jQuery Load Local html file in Phonegap -
I am creating multi page phone gap app
I have basic structure including scripts in CSS and index is. Html, I'm trying to load content dynamically in containers from other HTML pages.
When I load the contents of other dynamic page css then the page is not visible.
I have a locally-style sheet
script cdn path
index .html
< Pre> & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta charset = "UTF-8" /> & Lt; Meta name = "msapplication-tap-highlight" content = "no" /> & Lt; Meta name = "viewport" content = "width = device-width, initial-level = 1.0, maximum-level = 1.0, user-scalable =" /> & Lt; Meta charset = "UTF-8" & gt; & Lt; Meta http-equiv = "X-UA-Compatible" content = "IE = edge, chrome = 1" /> & Lt; Meta name = "apple-mobile-web-app-enabled" content = "yes" /> & Lt; Title & gt; Login & lt; / Title & gt; & Lt; Link href = "css / font-awesome.min.css" rel = "stylesheet" /> & Lt; Link href = "css / ej.mobile.all.min.css" rel = "stylesheet" /> & Lt; Link href = "css / index.css" rel = "stylesheet" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div data-role = "view" & gt; & Lt; Div id = "header" data-role = "ejmheader" data-AJ-title = "leap agent portal" & gt; & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;! - Cordova reference, it is added to your app when it is created - & gt; & Lt; Script src = "cordova.js" & gt; & Lt; / Script & gt; & Lt; Script src = "script / jquery-2.1.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "script / jquery.validate.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "scripts / jsrender.js" & gt; & Lt; / Script & gt; & Lt; Script src = "scripts / ej.mobile.all.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "script / platform overrides.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Var loadPage = function (url) {$ .ajax ({url: url,}) done (function (data) {$ ("# content") .html (data);}); } {Function () {"strict use"; document.addEventListener ('deviceready', onDeviceReady.bind (this), incorrect); function ondivediared () {loadPage ("views / login.html");};} )); & Lt; / Script & gt; & Lt; / Body & gt; & Lt; / Html & gt;
login.html
& lt; Form id = "loginform" method = "post" & gt; & Lt; H1 & gt; Enter login credentials & lt; / H1> & Lt; Br / & gt; User Name & lt; Input type = "text" expected id = "username" name = "username" & gt; & Lt; Br> & Lt; Br / & gt; Password & lt; Input type = "password" expected id = "password" name = "password" & gt; & Lt; Div align = "center" & gt; & Lt; Button type = "submit" data-role = "ejbootan" data-as-content type = "textimage" data -AJ-PRODUDOD = "auto" data-AJ-image class = "FF-key" id = "BTNLGen" & Gt; Login & lt; / Button & gt; & Lt; / Div & gt; & Lt; Div id = "message" & gt; & Lt; / Div & gt; & Lt; / Form & gt;
If I write everything without any load style sheets
If I have loaded with jquery load
Have you tried to check your domain / CSS to the Safari Development Inspector? Sometimes it helps, -)
Comments
Post a Comment