Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:38:14+00:00 2026-05-31T17:38:14+00:00

I am making a book, and use jQuery to change pages etc. At the

  • 0

I am making a book, and use jQuery to change pages etc.
At the top I have an $(document).ready(function() that does different stuff when the page is loaded.

On the GUI page I got a “change page” button, and when this is pushed, the function turnPage() is called. This method contain some code pluss this:

$.mobile.changePage("#device"+window.device, {
    transition: "slide",
    reverse: false,
    changeHash: true
});

My question is, when turnPage() is called, is also $(document).ready(function() called?
(Yes, I am new to this)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:38:15+00:00Added an answer on May 31, 2026 at 5:38 pm

    DOM ready event is an event that fires when the DOM is fully loaded except of images (<img>).

    The event fires once for each page load. So:

    • If the turn page() function makes a redirect, the answer is Yes.
    • If the turn page() function only gets data with ajax request, the answer is No.

    Important Update:
    I found this in the official plugin website :

    Important: Use pageInit(), not $(document).ready()

    The first thing you learn in jQuery is to call code inside the $(document).ready() function so everything will execute as soon as the DOM is loaded. However, in jQuery Mobile, Ajax is used to load the contents of each page into the DOM as you navigate, and the DOM ready handler only executes for the first page. To execute code whenever a new page is loaded and created, you can bind to the pageinit event.
    …
    …

    So turn page does an ajax request, so the final answer is No.

    What is the ready event:

    While JavaScript provides the load event for executing code when a page is rendered, this event does not get triggered until all assets such as images have been completely received. In most cases, the script can be run as soon as the DOM hierarchy has been fully constructed. The handler passed to .ready() is guaranteed to be executed after the DOM is ready, so this is usually the best place to attach all other event handlers and run other jQuery code. When using scripts that rely on the value of CSS style properties, it’s important to reference external.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on making a book catalog searchable using Solr. I have written
I'm making an aspx page that can edit books. A book is an complex
Making a word document of our network set-up. We have about 7 servers and
I want to use a UITabBarController but find that very difficult. I have a
I'm reading a book that's making a Twitter clone with Sinatra in order to
Suppose: I have a single table that holds the book ID, student ID and
Well I'm making a small phone book application and I've decided that using maps
I'm making an interactive book for the iPad and am using UINavigationController to implement
I'm making the app-book for ipad like app-magazine. Now I'm using ScrollView and want
In Hadley Wickham's ggplot2 book in chapter 10.3, he alludes to making plot functions.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.