Jquery Mobile Same Footer on Different Pages -
i want have same header , footer on pages on jquery mobile app , control using different file example footer.html. easy use php include can't because planning on using app phonegap.
searching around found using
<div data-role="footer"> <div class="footerext"></div> </div> and javascript
$('.footerext').load('footer.html') however not working. should mention javascript beginner, barely understand going on.
thanks lot
try following event, works code:
$('[data-role=page]').live('pageshow', function (event, ui) { $("#" + event.target.id).find("[data-role=footer]").load("footer.html", function(){ $("#" + event.target.id).find("[data-role=navbar]").navbar(); }); }); this gist shows entire code.
Comments
Post a Comment