jQuery and PhoneGap - Include a HTML file clientside with HTML or JS? -
jQuery and PhoneGap - Include a HTML file clientside with HTML or JS? -
i'm creating native android application using phonegap , jquery mobile.
when create multipaged page, don't include same navigationbar time. tried include (s)html. doesn't work. i've tried far:
<!--#include file="navigation.inc.html" --> <!--#include virtual="navigation.inc.html" --> <!--#include file="navigation.inc.shtml" --> <!--#include virtual="navigation.inc.shtml" -->
this page not placed on (web)server. when navigation.inc.shtml not server, possible include file html or javascript?
i'm running same issue. far can tell, android ignores server side includes.
i've been getting close reply load
based on answer
i'm taking different approach:
wherever need include external file:
<div data-include="footer"></div>
then, @ end of ( multipage ) index.html
$('div[data-include]').each(function() { $(this).load( $(this).attr('data-include') + '.html').trigger('create'); });
the problem doesn't work initial page view. subsequent pages great.
jquery html cordova include
Comments
Post a Comment