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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:43:30+00:00 2026-05-15T02:43:30+00:00

I know this is easy, just drawing a blank. If you look at this

  • 0

I know this is easy, just drawing a blank.

If you look at this page (all JS/CSS is on the one page), http://dl.dropbox.com/u/904456/expander.html

You can see what I have. Basically I would like to do two things differently.

A.) I would only like to show the .module .caption for the .module hovered, not both of them when either is hovered.
B.) I would like to slideOut rather then simply .show() and slideIn rather then simply .hide() (on hover and unhover.)

$(document).ready(function() {
  $(".module .caption").hide();
  $(".module").hover(function() {
    $(".module .caption").show(); 
    },function() {
    $(".module .caption").hide();   
  });
});

And my markup looks like:

 <div class="module span-1">
      <div class="inside">HOVER</div><!-- end .inside -->
        <h1>TITLE</h1>
        <div class="caption">
          <p>Caption ipsum lorem dolor ipsum lorem dolor ipsum lorem dolor ipsum lorem dolor</p>
        </div><!-- end .caption -->
    </div><!-- end .module -->

 <div class="module span-2">
  <div class="caption">
          <p>Caption ipsum lorem dolor ipsum lorem dolor ipsum lorem dolor ipsum lorem dolor</p>
      </div><!-- end .caption -->
      <div class="inside">HOVER</div><!-- end .inside -->
        <h1>TITLE</h1>
    </div><!-- end. module -->

Would love some assistance! And if your feeling especially generous, an explanation on your method (for next time). Thanks!

  • 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-15T02:43:31+00:00Added an answer on May 15, 2026 at 2:43 am

    By calling $(".module .caption").show(); you are showing all elements with the class caption inside an element with the class module. Instead, you want to use the element in question (the element that has been hovered), which you can reference using $(this). Then, you simply do your toggling however you’d like. See the jQuery effects API for your options. This is one way to get the desired effect:

     $(document).ready(function() {
      $("div.module div.caption").hide();
      $("div.module").hover(function() {
         $(this).find("div.caption").slideDown(); 
       },function() {
         $(this).find("div.caption").slideUp();   
       });
     });
    

    Edit: Rather than using a selector of the form $('.className'), it is generally better to use $('tag.className'), as this selector will use the native Javascript method getElementsByTagName rather than looping over all elements in the DOM looking for ones with the given class.

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

Sidebar

Related Questions

This should be easy, just curious. I know httpd is the HTTP daemon, just
I know this is an easy one, but I just started working with plists,
I know this is easy but i m just not able to debug it.
I know this is an easy concept, but I just can't seem to get
I know this sounds like an easy question but for some reason I just
I know this is an easy question, I am just not getting something...so thank
I know this is easy enough just removing the f.label, but then it changes
I know this is something easy but I just can't see it. Can anyone
I know this should be easy but it's just not my day today. I
sorry - I know this is dead easy stuff, but I'm just trying 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.