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

  • Home
  • SEARCH
  • 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 3497756
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:24:33+00:00 2026-05-18T12:24:33+00:00

I honestly tried to do search before posting but couldn’t find something specific. So

  • 0

I honestly tried to do search before posting but couldn’t find something specific.
So my task is to show hidden content in the blog, when user clicks on the link.
HTML looks like this:

<div class="entry">
<p>Here is a visible content <a class="a-toggle"> Read More...</a></p>
<div class="hidden_post"><p>Here is all the hidden content</p></div>
</div>

Now jQuery I’m doing the following but it’s not working:

$(".hidden_post").hide();
$(".a-toggle).click(function() {
$(this).next(".hidden_post").slideDown("slow"); });

So to get next element I need to go to a parent element first and then proceed search from there.
Now it gets more complicated for me, because I’ll actually going to have several hidden
contents in one “entry”. Like this:

<div class="entry">  
<p>Here is a visible content <a class="a-toggle"> Read More...</a></p>
<div class="hidden_post"><p>Here is hidden content #1</p></div>
<p>Here is a visible content <a class="a-toggle"> Read More...</a></p>
<div class="hidden_post"><p>Here is hidden content #2</p></div>
<p>Here is a visible content <a class="a-toggle"> Read More...</a></p>
<div class="hidden_post"><p>Here is hidden content #3</p></div>
</div>

Now if I use $(this).parent().next(".hidden_post").slideDown("slow");
It will go up to “entry” div and then will find first “hidden_post” only. I guess
I still need another solution to go straight from <a class="a-toggle"> to <div class="hidden_post"> that is next to it. Is there any solution?

  • 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-18T12:24:34+00:00Added an answer on May 18, 2026 at 12:24 pm

    You could use parent():

    $(".hidden_post").hide();
    $(".a-toggle").click(function() {
       $(this).parent().next(".hidden_post").slideDown("slow");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would Google this, but honestly I have no idea what to search for
I was walking through the new html 5 features and I saw and tried
I'm trying to deploy a WCF-service, but I'm having dificulties getting the final bits
I've got a UserControl that, oddly enough, bundles a bunch of other controls and
Trying to install the new Rails 3 release on OSX 10.6. Have never touched
So, I started programming in DirectX11 today, I've had a lot experience with coding,
It's my understanding that in wxPython in OSX, ⌘+w support for closing wx.Window objects.
I've inherited the source to a legacy VB6 barcode library with no documentation. My
Following up on InternalsVisibleTo . I have looked at c# Instantiating Internal class with
I am looking to make an installer for a .net application which requires a

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.