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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:06:10+00:00 2026-06-17T03:06:10+00:00

I tried doing it using the method below. However because jQuery has not been

  • 0

I tried doing it using the method below. However because jQuery has not been defined I get a –

ReferenceError: jQuery is not defined

from Firefox.

I was hoping it would have been undefined and testable not error producing.

If I define a dummy variable like this var jQuery, then when I use jQuery I will always be using that blank variable due to scope look-up rules.

How do I detect when the jQuery global variable is ready?

    // ... snip

    if (jQuery) { // not defined - I guess different from undefined - always errors

    // ...snip
  • 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-17T03:06:11+00:00Added an answer on June 17, 2026 at 3:06 am
    if(window.jQuery !== undefined)
    

    or

    if(typeof jQuery !== 'undefined')
    

    However, the first version is more readable in my opinion and in a browser environment window is the global object so window.X is pretty much equivalent to the global X – except the fact that trying to access an undefined window.X will not throw an error.

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

Sidebar

Related Questions

I'm making a request to a JSON page using jQuery's $.getJSON method, and from
I'm using devise 2.1.0. On dev, things are great. I just tried doing a
I tried doing a mvn dependency:tree and I get a tree of dependencies. My
I've been writing output from perl scripts to files for some time using code
I've not been doing much WinForms programming for the last few years, so I'm
Im trying to consume a web service using the below WSDL from a .NET
I have the code below which I am using from an Android java tutorial.
I tried to make a generic helper method using Moq with nunit as described
I tried doing this: [toolbar setTint:[UIColor colorWithPatternImage:[UIImage imageNamed:@thingFromMyBundle.png]]]; but it just ended up black.
I tried doing var div = document.createElement('div'); var nodeList = new query.NodeList(); nodeList.push(div); nodeList.children(.someClass);

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.