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 7887645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:38:02+00:00 2026-06-03T05:38:02+00:00

I recognise this question probably goes to how Javascript functions operate in general (and

  • 0

I recognise this question probably goes to how Javascript functions operate in general (and not just my particular case), but…

I want to know how my document ready function… umm… functions. In stylised form, it’s like the following:

$(function () {
    object1.init();
    object2.init();
    object3.init(); etc...

Will object2.init() only fire when object1.init() returns? Or will they all fire in an asynchronous kind of way?

UPDATE: If they fire sequentially, is there any way I can get them to go simultaneously (which I possibly don’t need to do)?

Thanks.

  • 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-06-03T05:38:04+00:00Added an answer on June 3, 2026 at 5:38 am

    Will object2.init() only fire when object1.init() returns? Or will they all fire in an asynchronous kind of way?

    object2.init() only fire when object1.init() returns.
    All the functions are stored in a queue, and get fired one after the other.

    There is no way to make them fire simultaneously.
    Not just jQuery, but javascript doesn’t support parallel programming.


    You can see the jQuery source code:

    ( Update: I removed the actuall code, because the answer became a mini jQuery source code…)

    // Handle when the DOM is ready
    ready: function(wait) {
        ...
    
    // Call all callbacks with the given context and arguments
    fireWith: function(context, args) {
        ...
    
    jQuery.Callbacks = function( flags ) {  
        ...
    
    // The deferred used on DOM ready
    readyList,
    

    Check those functions and variables in the jQuery source code

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

Sidebar

Related Questions

There is probably a simple answer to this question but I do not have
This is probably a really simple question but I can't seem to find anything
I recognise this is a popular question but I couldn't find anything that answered
This might be a duplicate question but as you can see they didn't get
This is a rather unusual question but here's the issue: I have a WPF
How do I make awk recognise character classes? For example, this: echo a\n1\nb\n2\nc |
Whenever i try to run sqlmetal, i get this: 'sqlmetal' is not recognized as
We've probably all seen this screen when testing, all you need is a HTTPS
I'm new to this, so sorry if my question has been asked before. I
I found this question which gives me the ability to check if a string

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.