-1

From docs here:

Use $(document).bind('pageinit'), not $(document).ready()

I have the ff in a JQM page:

$(document).bind('pageinit',function(event){
    //some code here
});

The page was loaded via ajax in JQM page, but it was NOT triggered at all. How to make it work?

Thanks

4

1 回答 1

1

try this, it's from the doc

$( '#aboutPage' ).live( 'pageinit',function(event){
  alert( 'This page was just enhanced by jQuery Mobile!' );
});
于 2012-12-03T09:09:30.090 回答