before create page

before create page

hi,

in a jqm 1.3.2 multipage-webapp I parse my HTML on pagebeforecreate. 

  1. $(document).on("pagebeforecreate", '[data-role="page"]', function( event ) {
  2.  //do some stuff
  3. });

That works so far. Doing stuff is done before page is created. But now I need to load an external script …

  1. $(document).on("pagebeforecreate", '[data-role="page"]', function( event ) {
  2.  $.getScript("script.js", function(){
  3.   //do some stuff
  4.  });
  5. });
… but that doesn't work because the creation of the page goes on while script.js is loaded. 


Is there any way to force loading the external script before creating goes on?


best,
heinetz