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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:17:39+00:00 2026-05-26T02:17:39+00:00

Okay, so basically I can’t get it to work with parent as the class

  • 0

Okay, so basically I can’t get it to work with parent as the class isn’t in the parent div.

CSS:

.contentSlide{
    display:none;
}

HTML:

<div class="contentSlide">
    <p>Members image on left and comments on the right. Date floated on right, and link to user.</p>
</div>

<div id="button" class="open">Comments(6) &#x25bc;</div>

JS:

$(".open").live('click',function(){
    $(this).parent(".contentSlide").slideDown();
    $(this).html("Close \u25b2 <span style='float:right;' onclick='reply=true;' class='reply'>Post a <a href='javascript:void(0);'>comment</a></span>").removeClass("open").addClass("close");
});

Basically, we want the div class “open” to make the “contentSlide” div slideDown if it is clicked.

We don’t want to use $(".contentSlide").slideDown(); as we want this to be global in the event that we have more than one of these contentSlide divs displaying on the page.

  • 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-26T02:17:40+00:00Added an answer on May 26, 2026 at 2:17 am

    In the case of the HTML you’ve provided and that it’s all we have to go by, you would want to use the .prev() function.

    $(this).prev().slideDown();
    

    But I would suggest giving it an ID of some sort or a data type.

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

Sidebar

Related Questions

Okay, so this seems simple, but I can't think of a straightforward solution; Basically
Okay so I've been set an assignment from university and I just can't get
Okay basically here's where I'm at. I have a list of PropertyDescriptor objects. These
Okay, basically, I have a large list of phone numbers in a text file
Okay, so basically I want to be able to retrieve keyboard text. Like entering
Okay, so I am basically making a script to pass post data using cURL.
Okay I know I asked about this before, and the answer was basically cache
Okay, I've looked all over the internet for a good solution to get PHP
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent
Okay basically, I'm designing and developing a fairly complicated website which revolves around the

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.