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

The Archive Base Latest Questions

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

ok, Im going to pass on submitting how I would do this…because I dont

  • 0

ok, Im going to pass on submitting how I would do this…because I dont want a patch to an otherwise crappy piece of code. Heres what Im trying to do: I use php to output some divs. A corresponding set of divs is generated with the first divs. The whole idea is that when the first div is clicked, the corresponding div slides down. My attempts at this so far have been unsuccessful. Im guessing the id is going to have to correspond with the class of the other div or something to that affect. I’ve been baking on this one for awhile. Any help is really 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-05-27T14:28:56+00:00Added an answer on May 27, 2026 at 2:28 pm

    To start with, go with this structure:

    <div class="main" rel="foo">Content</div>
    <div class="main" rel="foo2">Content 3</div>
    <div class="main" rel="foo3">Content war</div>
    
    <div id="foo">Content</div>
    <div id="foo2">Content</div>
    <div id="foo3">Content</div>
    

    And now, you can use a simple jQuery:

    $(document).ready(function() {
        $('.main').click(function() {
            var opener = $(this).attr('rel');
            $('#' + opener).slideToggle();
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have array object in jquery. array=[]; array{Id:user.Id,Date:user.Date}; Now am going to pass this
I am going to be collecting tags that I want to pass in a
Been going over my predecessor's code and see usage of the request scope frequently.
I want to pass many arguments to a shell script which I don't know
This is probably going to be a no, but is there any way I
I am trying to create a http body that I am going to pass
Started up solving UVa problems again as a way to pass time (going to
I was going through (using Squeak) the Discovering Better Code: Bowling for Smalltalk Series
Can I pass this to a function as a pointer, from within the class
I want to pass a comma delemited list of values as a parameter to

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.