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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:28:07+00:00 2026-05-30T14:28:07+00:00

I am having problems with my code. It should take an object containing 4

  • 0

I am having problems with my code. It should take an object containing 4 strings and using a function it should create 4 rectangles which the user can click on. Once the user clicks on a rectangle I am applying some animation to it before it disappears. I then want to return the exact one that was clicked and then repeat this with a new function.

Apologies if that is confusing, I have a JFiddle here: http://jsfiddle.net/rickdonohoe/dpPj7/ which should show it.

My problems are:

  1. It haven’t been able to change the html content based on the object of strings passed into the function.

  2. I’m not sure how to return the one which was clicked.

  3. In the each() function each div is created with a class of four_q1. I want this to increment for all 4 with four_q2 etc How do I do this?

Oh and this is my first JFiddle so any problems or criticism please let me know!

Thank You,

Rick

  • 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-30T14:28:08+00:00Added an answer on May 30, 2026 at 2:28 pm

    I messed with it, stripped some junk out, and got this… it should start you in the right direction.

    Remember, you can’t parse an object for each element in a standard format, try an array instead.
    Also, it’s a bad idea to pass jQuery objects around. Instead try passing the selector.

    http://jsfiddle.net/dpPj7/20/

    //===== After Comments ======

    http://jsfiddle.net/dpPj7/33/

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

Sidebar

Related Questions

I'm having problems with some code to create a CDialog based window. The code
this week I'm having problems logging in LinkedIn using ruby mechanize. My code is
I'm having problems getting several divs to function as two columns. In the code
I'm trying to rewrite some code using the sqldf library in R, which should
I've been having problems with this code I had spent the last 3 hours
Basically i am having problems with my code - this is homework so would
I am having problems with my JScript code. I am trying to loop through
I'm still new to code igniter and I'm having problems getting the login system
I'm having some problems with the following code: private class ClientPluginLoader : MarshalByRefObject {
I'm having some problems trying to get the code below to output the data

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.