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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:14:49+00:00 2026-06-09T05:14:49+00:00

I’m working on a small jQuery element and I’m pretty much done with the

  • 0

I’m working on a small jQuery element and I’m pretty much done with the help of Stackoverflow and google but there’s a small problem that I can’t seem to figure out. Tried to solve it with CSS but that didn’t go anywwhere.

I have jsFiddle for the project: http://jsfiddle.net/PcWjA/2/

Everything works fine, the add/subtract buttons work and the active class runs through the spans. But what I’m still missing is that when you’re on the number 7 and then press the + button so it goes to 8 I want it to display the ul item. And when you go down to 7 the ul item goes hidden again.

Like I said I tried a few CSS solutions, add class/remove class etc but that doesn’t seem to work. So I was thinking, is it possible to make the hidden ul shown when the class “spanval_active” is in the span class “more”.

  • 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-09T05:14:50+00:00Added an answer on June 9, 2026 at 5:14 am

    Take a look, if this what you want: http://jsfiddle.net/PcWjA/3/

    So to explain:
    You already are getting at what element is currently active (stored at hour variable), so we need to check if currently active element is higher than 7 or lower-equal. If it is higher then we need to show the list, we do that by calling jQuery method .show() on the list, if it is lower we hide the list with .hide()

        if (hour > 7) {
            $('.more .hour_dropdown').show();
        } else {
            $('.more .hour_dropdown').hide();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't

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.