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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:44:06+00:00 2026-06-05T22:44:06+00:00

The following code is having some problem with the jQuery. <script type="text/javascript"> $(window).load(function() {

  • 0

The following code is having some problem with the jQuery.

<script type="text/javascript">
        $(window).load(function() {
            ..
        });
    </script>

If I include jQuery in the document head and then use the above code, it will work fine.
However, if I use include jQuery using the WordPress function wp_enqueue_script, I get following error: $ is not defined.
I can see from the page source that the jQuery is loaded properly in the header.
How can I fix it?

  • 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-05T22:44:07+00:00Added an answer on June 5, 2026 at 10:44 pm

    Use jQuery with a capital Q instead of $ to make it work. WordPress usually includes a script which calls jQuery.noConflict() at the end, leaving $ undefined.

    jQuery(function($) { //jQuery passed in as first param, so you can use $ inside
       // use $
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having some problems with a solution that apparently works: <script type=text/javascript > //following code
I'm having troubles with the following code: <link type=text/css href=http://jqueryui.com/latest/themes/base/jquery.ui.all.css rel=stylesheet /> <script type=text/javascript
Using this hotkeys plugin, https://github.com/jeresig/jquery.hotkeys , I'm having some problems with the following code:
im having some trouble with the following code: Ext.define('...controller...', { extend: 'Ext.app.Controller', init: function()
I am having some Problems with JavaScript. I have got the following code: <html>
I'm having some issues getting file uploads to work correctly and the following code
I'm having a problem with the following code foreach ($ex in (foo, bar, baz))
I'm having a problem with the following code snippet: <!DOCTYPE html> <html> <head> <title>Hangman</title>
I'm having a problem with the following code: string latString = 50.09445; float lat
I'm having some problems with the following code: with open('townhall.map', 'r') as f: for

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.