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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:53:20+00:00 2026-06-12T12:53:20+00:00

I want to be able to show/hide specific text (using jqery). The issue is

  • 0

I want to be able to show/hide specific text (using jqery). The issue is that I will have more than one version of this text tag with the same id, and I want to be able to perform the animation on a specific child when you hover over the parent, and not perform it on all of the text blocks with the same id.

Here’s my code:

HTML:

<p>Move your cursor over the posts below to read more.</p>
<div id="postContainer">
    <div id="post">
        <h4>Title 1</h4>
        <h5>Date goes here</h5>
        <p id="postDetails">Blah Blah Blah, this text is hidden until you hover over it's own parent.</p>
    </div>
</div>
<div id="postContainer">
    <div id="post">
        <h4>title 2</h4>
        <h5>Date goes here</h5>
        <p id="postDetails">This is the second hidden text, but it is revealed when you hover over the first post as well.</p>
    </div>
</div>

CSS:

#post
{
    background:#DDDDDD;
}
#postDetails
{
    display"none;
}

Jquery:

<script>
    $('#post').mouseenter(function() {
      $('#postDetails').slideDown("slow");
    });
    $('#post').mouseleave(function() {
      $('#postDetails').slideUp("slow");
    });
</script>

Is there a way to reveal only one without creating a bunch of different div id with different names for each? There are 20-some boxes all like this (and they should all look identical) and I want to be able to reveal only one at a time, when the user hovers over that subsequent box, as revealing all 20 at the same time will greatly expand the page length and annoy the user.

  • 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-12T12:53:22+00:00Added an answer on June 12, 2026 at 12:53 pm

    If you have multiple elements then insted of using id’s use class.

    Please see the jsfiddle. I changed some markup.

    DEMO

    http://jsfiddle.net/saorabhkr/xtrpK/1/

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

Sidebar

Related Questions

I want to be able to show/hide the rows in a table using jquery.
I want to be able to take an image that i have already captured
I have a div that I want to remove using remove(). I want to
Hi i just want to be able to toggle to hide/show a div respectively
I want to filter a table using jQuery hide/show based on what the user
ok, So I have multiple divs(7) which I want to toggle for show hide.
I have 3 checkboxes and 2 divs. I want to be able to show
I have a varchar field full of text and I want to be able
How do you show and hide widgets in Tkinter? I want to have an
I want to be able to show the elapsed time in a textview or

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.