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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:28:47+00:00 2026-05-31T19:28:47+00:00

Trying to do an image caption but can’t figure the this object selector right

  • 0

Trying to do an image caption but can’t figure the “this” object selector right to only get the image I am rolling over.

The caption works fine but hovering one triggers all. Below is what I have to try to trigger one but doesn’t work. Can anyone tell me how to put in the right selector?

HTML

<ul id="columns">
        <li class="col-1">
            <div class="photo1">
                    <p>I am doing great. I love this place and I would love to work here.</p>
            </div>
            <div class="photo2">
                <p>I am doing great. I love this place and I would love to work here.</p>
            </div>
            <div class="photo3">
                <p>I am doing great. I love this place and I would love to work here.</p>
            </div>
            <div class="photo4"></div>
            <div class="photo5"></div>  
        </li>
        <li class="col-2">
            <div class="photo6"></div>
            <div class="photo7"></div>
            <div class="photo8"></div>
            <div class="photo9"></div>
            <div class="photo10"></div>
        </li>
        <li class="col-3">
            <div class="photo11"></div>
            <div class="photo12"></div>
            <div class="photo13"></div>
            <div class="photo14"></div>
            <div class="photo15"></div>
        </li>
</ul>

CSS

.photo1 {
        position: relative;         
        background: url(../img/sncc_teaser.jpg) no-repeat;
        width: 250px;
        height: 339px;
        margin-bottom: 5px;
    }
ul li p {
    display: none;
    position: absolute;
    background-color: gray;
    width: 250px;
    color: white;
    margin: 0;
    padding: 0;
    padding-left: 5px;
    bottom: 10px;
    left: 0px;

}

jQuery

$(document).ready(function(){
    $(".col-1").hover
        (
            function($e) 
            {
                $("li p", this).show();
            },

            function($e) 
            {
                $("li p", this).hide();
            }
    );
});
  • 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-31T19:28:49+00:00Added an answer on May 31, 2026 at 7:28 pm

    Hover on the DIV, not the entire column:

    $(".col-1 div").hover
            (
                function($e) 
                {
                    $(this).find('p').show();
                },
    
                function($e) 
                {
                    $(this).find('p').hide();
                }
        );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use this jQuery script to make an image caption from
I'm trying to get the captions from images in Wordpress but I can't find
This is a pretty frustrating newb question, but I can't seem to get iteration
I am trying to concatenate image url (string) with img tag but i am
Trying to create a background-image slideshow and am getting this error... This is the
I'm trying to get just a piece of information from Facebook, but I don't
I'm trying to center a block element (the WordPress caption box, including the image)
I'm trying to make a simple gallery and can't figure out what is wrong
I am trying to position a caption below an image without explicit knowledge of
I have a string that looks something like this: {{imagename.jpg|left|The caption for this image.

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.