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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:14:19+00:00 2026-05-31T02:14:19+00:00

So after attending a local coding club meeting for the first time I became

  • 0

So after attending a local coding club meeting for the first time I became inspired to look into jQuery again and try and replicate something one of the speakers talked about. I have got the general idea of the problem done ok, it’s just that I can’t seem to make the image (that is being hovered over by the cursor) appear over the image that isn’t been hovered over. I thought that adjusting the z-index would help negate this but nothing appears to be working.

I have uploaded the files etc to http://www.downloadthatmovie.com/jquery/, and here is the source code for the page:

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>jQuery Animation 3</title>
<style type="text/css">
    .imgOpa
    {
        height:200px;
        width:200px;
        opacity:0.5;
        filter:alpha(opacity=50);
        z-index:0;
    }
    article{
        padding:20px;
    }

    img{
        z-index:0;
    }
</style>

<script type="text/javascript" src="jquery-1.6.4.min.js"></script>

</head>

<body>

<article>
  <p>
    <img class="imgOpa" src="img/image1.jpg" alt="Image 1"  />
    <img class="imgOpa" src="img/image2.jpg" alt="Image 1"  />
    <img class="imgOpa" src="img/image3.jpg" alt="Image 1"  />
    <img class="imgOpa" src="img/image4.jpg" alt="Image 1"  />
    <img class="imgOpa" src="img/image5.jpg" alt="Image 1"  />
  </p>
</article>

<script type="text/javascript">
$(function() {
$('.imgOpa').each(function() {
$(this).hover(
function() {
$(this).stop().animate({ "opacity": 1.0, "margin-top":0, "margin-right":0, "margin-right":-50, "z-index":999, "height":250, "width":250 }, 100);
    },
function() {
$(this).stop().animate({ "opacity": 0.5, "margin-top":0, "margin-right":0, "margin-right":0, "z-index":1, "height":200, "width":200 }, 100);
    })
  });
});
</script>

</body>
</html>

The way the images behave right now probably looks weird, but I’m just testing a few things out before I tackle a larger problem. As I said earlier, I am wanting the image that is being hovered over by the cursor to be above the other images. It has been 4 months since I last touched jQuery but have finally kicked myself awake and am re-acquainting myself with it.

Cheers everyone!

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

    This SO thread pointed me to on this post on stacking context. Just add

    .imgOpa
    {
        position: relative;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first attempt at playing with Pandas library after attending Wesley's tutorial
After discovering about Javascript namespaces, I tried to implement them but I run into
After some time researching and trying different things I still cannot get my @ExceptionHandler
First, please bear with me. I have hard time telling others my problem and
After attending a talk on Oslo/M I am struggling a bit to see the
I have collapsable/expandable tree created in jQuery. After loading the tree: $(#tree).treeview({ collapsed: true,
When appending to a file using Windows batch commands, how to append immediately after
I have a working project that Im amending, it crashes after trying to use
After deploying WCF server (svc) on my Server, I have got this message when
After a system upgrade i am no longer able to start my tomcat5 server.

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.