0

Typically, a Cordova / jQueryMobile app has a index.html file containing many data-role="page" pages.

May I partition the index.html file into several parts part1.html, part2.html...?

My goal is to partition a huge DOM into several smaller DOMs to get loaded on demand.

I did search the Cordova and jQueryMobile documentation sites, but failed to find a hint.

SteAp
  • 11,853
  • 10
  • 53
  • 88

1 Answers1

0

You need to use these things

$(document).on('pagebeforeshow', "#index",function () {
        $(document).on('click', "#changePage",function () {     
            $.mobile.changePage('second.html', { dataUrl : "second.html?paremeter=123", data : { 'paremeter' : '123' }, reloadPage : false, changeHash : true });
        }); 
    });

OR

data-url='about.html'
data-ajax='false'

etc.

Learn using these things. Then you'll be able to handle mutiple html files for JQM.

Lets get you started with these following links

Create Multiple jQuery Mobile Pages and Link them

Check the question and also the first answer : Navigate between three pages in two different files in JQuery Mobile

AND this one : Linking pages

Community
  • 1
  • 1
AtanuCSE
  • 8,832
  • 14
  • 74
  • 112
  • Thank you! Hm, my question was kind of trivial. Found a solution minute after my post. But was AFK after that. – SteAp Jun 15 '14 at 21:30