I load an external page into a div on my jqm page and to improve it using jQuery mobile styles, I call the trigger ('pagecreate') on the div, this works from the console.
$('#search-results-page').load('searchResults.php',{options:$.encodeJSON(data.options),search:$.encodeJSON(data.search)},function () {
$(this).trigger('pagecreate',{options:{}});
$.mobile.changePage('#search-results-page');
});
This works if I put my code in a catch try block, but if I do not, I get this error:
Uncaught TypeError: Unable to read the 'options' properties from undefined jquery.mobile-1.3.1.js: 7535
source
share