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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:41:16+00:00 2026-06-12T04:41:16+00:00

I have a group of hidden divs all with the same class but with

  • 0

I have a group of hidden divs all with the same class but with unique automatically generated IDs. I also have thumbnails which have the exact same IDs as the hidden divs.

When a thumbnail is clicked it’s ID is stored in the variable clickedId like this:


var clickedId = $(this).attr("id");

but what I can’t figure out is how to find the hidden div with that particular ID so that it can be shown with that same click.

This is the relevant HTML showing the divs to be unhidden.

<div id="projectHolder">
   <div class="project-content" id="project-<?php echo $post->post_name;?>">                                
   <p>Div content</p>
   </div>

   <div class="project-content" id="project-<?php echo $post->post_name;?>">                                
   <p>Div content</p>
   </div>
</div>

I’ve tried variations on this but they are mainly my guesses:

$('.project-content').find().each(function(){
if ($this.is(clickedId)).fadeIn(); 
});

Any suggestions to point me in the right direction?

  • 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-12T04:41:17+00:00Added an answer on June 12, 2026 at 4:41 am

    Untested, but should get you going.

    $('#projectHolder').children("#" + clickedId).fadeIn();
    

    Also, as has been said, consider switching to classes so you don’t have duplicate Ids on the page.

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

Sidebar

Related Questions

I have a group of buttons that should act like toggle buttons, but also
I have a group of tabs that have hidden content which display when the
I want to hide all blocks which only contain hidden DIVs (aside from a
I have a group of three radio buttons. Depending on which radio button is
I have some radio buttons and I'd like to have different hidden divs show
I have a group of section tags which I am trying to cycle through
I want to target all divs that have an id that begins with section;
I have a group of records which are split into segements of 5 each
i have a group of audiences with checkboxes hidden under its audience group. now,
I have a report with one group (Office Name) which page breaks between each

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.