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

  • Home
  • SEARCH
  • 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 931943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:35:03+00:00 2026-05-15T20:35:03+00:00

i wonder if i use google.load(jquery, 1); google.setOnLoadCallback(function() { // i still need to

  • 0

i wonder if i use

google.load("jquery", 1);
google.setOnLoadCallback(function() {
    // i still need to check if document has finished loading with 
    $(function() {
        // do stuff
    });
});

the question is when google.setOnLoadCallback() is called it does not mean the document has finished loading right? or can i do stuff like … below … straight away?

google.setOnLoadCallback(function() {
    $("#elem").doSomething();
});
  • 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-15T20:35:04+00:00Added an answer on May 15, 2026 at 8:35 pm

    From Google AJAX API docs:

    google.setOnLoadCallback is used as a helper for window.onload, which only happens once, when the document is loading. Therefore, for dynamic loading of the API (such as after user interaction), google.load with the callback option should be used instead (see below).

    window.load will always fire after DOMContentLoaded that is the equivalent of jQuery(document).ready for most cases. When not available, jQuery will fallback to onreadystatechange or onload (IE), or load (standard).

    Since worst case if both jQuery and google falling back to the load event, you can safely use the second method.

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

Sidebar

Related Questions

i wonder if i can use google translate api to translate ajax embedded texts
I'm developing an application that use Google messaging. Hence, I need to include the
I wonder how to use namespaces in asp.net c# project? I am prepend in
I ran across a comment that made me wonder: If you use a sharding
I wonder if the below use of between in the link is correct considering
I wonder whether I can use knitr markdown to just create a report on
I wonder how I should use the GTree (from GLib) to store data? Every
I wonder why I should use: puts In folder #{File.join ENV[HOME], projects} Instead of:
I wonder why many web sites choose to use random id:s instead of incrementing
I wonder if there is a way to use zipcode instead of Lat and

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.