How To Load Pages Using Jquery Load() In Phonegap
I am trying to load html pages in phonegap using jquery.load() function. but it is not working. It does not load the pages which I want to load. Here is my code jQuery(function ()
Solution 1:
I noticed that your HTML file login.html
is inside your folder www
.
So, I think you may try to load the HTML file by using (pay attention to the path of the HTML file!)
$('.contents').load('your_login_html_path/login.html');
instead of:
$('.contents').load('http://localhost:8888/placeeq/assets/www/pages/login.html');
For example: if your html file (not login.html
, the other one which calls the method load()
) is in the folder www
, and if login.html
is in www
->pages
, you'll have:
$('.contents').load('./pages/login.html');
Eg folder structure:
www
html_calling_load.html
pages
login.html
Hope this helps. Let me know about your results.
Post a Comment for "How To Load Pages Using Jquery Load() In Phonegap"