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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:42:26+00:00 2026-06-13T16:42:26+00:00

First sorry for my english as it is not my first language. I am

  • 0

First sorry for my english as it is not my first language.
I am building a timeline website for a school project and it is going great but one thing keep bugging me.

I have these balls and when clicked they open a div behind them and close all others and set some classes so i know they are opened.

Works great if you try to open a different one then the one that is allready open.

Now here is the problem if i open one and click it again to close it I get this far into the code:

if($('.balkln, .balgrt').hasClass("open")){
      console.log("Clicked and there is a open class active!");

but it will never fire the animation that is set next even though it has the class infoopen

$(".infoopen").stop().animate({

Link to the website:
http://kloek.skippy.nu

Anybody got an idea?

Thanks

  • 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-13T16:42:28+00:00Added an answer on June 13, 2026 at 4:42 pm

    The problem is that you are trying to see if either a .balkln or .balgrt have an element with class open inside of them. Your code checks if .balkln or .balgrt have that class themselves.

    Try to change your code to this:

    if($('.balkln, .balgrt').find(".infoopen")){ // this will look for open divs within balls
      console.log("Clicked and there is a open class active!");
    

    That condition should be true and it’s what you want. Furthermore I sense that your code has structural errors in that you look for a ball that is open and next you look for an info div to close. What you want is to look for a ball that is open and close the info div it contains. Your code will work for now, but you’ll run into trouble when you’ll allow for multiple balls to be open at the same time as closing one will result in closing all of them.

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

Sidebar

Related Questions

sorry in advance for any orthographic mistakes (english is not my first language). I
(First of all, sorry for my english, it's not my first language) I have
first, I'm sorry for my poor English, it's not my first language. It's my
First of all, sorry for my English I'm not good at it but I
First, I'm sorry for my english, it's not my native language. I try to
First, sorry for my weak english language, I'm beginner programmer. In my project I
First of all sorry for my mistakes in English its not my primary language
First, sorry for my language skills, I am not used to writing in English.
First of all, sorry, but my English is not very good. I'm at the
First I'm sorry for my bad english it's not my native language. I'm new

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.