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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:22:20+00:00 2026-06-10T16:22:20+00:00

Hey all looking throughout all of stackoverflow this looks like a common error i

  • 0

Hey all looking throughout all of stackoverflow this looks like a common error i just cant wrap my head around. i am busy upgrading our site from pure JS to jquery in preparation for us moving over to Rails 3.1 now i have this javascript:

 :javascript
   ["Ownership", "Management", "EmploymentEquity", "SkillsDevelopment", "PreferentialProcurement", "EnterpriseDevelopment", "SocioeconomicDevelopment"].each(function(element) {
     $$('.' + element).each(function(s) {
       s.toggle();
     });
 });

so basically it is running trough an array of css classes and then toggling them. now when i run this with the jQuery lib i get an error that looks like this

Uncaught TypeError: Object Ownership,Management,EmploymentEquity,SkillsDevelopment,PreferentialProcurement,EnterpriseDevelopment,SocioeconomicDevelopment has no method 'each' 

now i am just trying to test one element at a time to get the jQuery working at least this is what i have so far.

$("OwnershipHeader").click(function () {
$("Ownership").toggle("slow");
});

very simple so just when you click on the header it toggles its children. so when i enter that in the console it works just fine. until i click on the header of coarse:

Uncaught ReferenceError: $$ is not defined

this seems really simple and yet its breaking every time… i am relatively new to jQuery i have just worked with the Jquery UI lib before. any suggestions are appreciated

  • 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-10T16:22:21+00:00Added an answer on June 10, 2026 at 4:22 pm

    Uncaught TypeError: Object Ownership,Management,EmploymentEquity,SkillsDevelopment,PreferentialProcurement,EnterpriseDevelopment,SocioeconomicDevelopment has no method ‘each’

    I think you meant forEach. But since this doesn’t work in all browsers, use jQuery’s each function

    $.each(["Ownership", "Management"], function(i, element) {...
    

    Uncaught ReferenceError: $$ is not defined

    jQuery uses a single dollar sign ($)

    $("OwnershipHeader").click(function () {
      $("Ownership").toggle("slow");
    });
    

    jQuery selectors are mostly like CSS selectors. So this should work:

    $(".OwnershipHeader").click(function () {
      $(".Ownership").toggle("slow");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all, working on a C++ little game, Connect 3. This is just like
Hey all. I just started looking into the cocos2d library. I've heard that it's
Possible Duplicate: Form validation Hey all, I'm just looking for what the correct way
Hey all, I'm looking for a fresh set of eyes to check out this
Hey all, looking to reduce the code on my c# if statements as there
Hey all I'm extremely new to jquery and ajax and I'm looking for some
Hey All, I currently use Google's API to include jQuery into my sites like
Hey all, looking to see if theres a way to easily include external html
Hey all, I'm currently working on a Java Swing application and I was looking
hey guys im looking for a way to show all mp3 files in a

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.