JQuery Mobile Unable to read "parameters" undefined in trigger ('pagecreate')

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

+1
source share
1 answer

I got this error, and that was because I used jQuery 2.0.0

Try it with jQuery 1.9.1

+10
source

All Articles