jQuery Mobile: document ready vs. page events
Asked 07 September, 2021
Viewed 2K times
  • 64
Votes

I am using jQuery Mobile, and I am having trouble understanding differences between classic document ready and jQuery Mobile page events.

  1. What is the real difference?

    Why should

    <!-- language: lang-js -->
    
    $(document).ready() {
    
    });
    

    be better than

    $(document).on('pageinit') {
    
    });
    
  2. What is the order of page events, when you transition from one page to another?

  3. How can I send data from one page to another and is it possible to access data from previous page?

5 Answer