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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:56:17+00:00 2026-05-30T20:56:17+00:00

I am web-designer, not a programmer and a newbie in Javascript / jQuery (although

  • 0

I am web-designer, not a programmer and a newbie in Javascript / jQuery (although I do have experience with PHP )

I am having a problem understanding why I can not seem to target the right div for a hover effect.

Fiddle is here :
http://jsfiddle.net/obmerk99/F6wJs/

When I target a certain div class (.mas), the effect works just fine
But when I target a second div class (.meta2 – absolute positioned within the boundaries of the first – .mas ) the effect does not work.

(plain words – I want the effect to be triggered by the thumb, and not by the large image.)

the code is the same, so it is not a syntax error – I am sure I am missing something fundamental about understanding jQUery.

Care to explain ??

EDIT I :

After understanding what @Rick explained – I must say that my problem was a bit more complicated , I just posted the simple version because i thought it is enough.

The real markup has MORE than one element of the said classes.

If I remove “,this” from the code, it will trigger ALL of them ..

New Fiddle Here :
http://jsfiddle.net/obmerk99/F6wJs/1/

  • 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-30T20:56:19+00:00Added an answer on May 30, 2026 at 8:56 pm

    The issue is actually on the fade-in. In the JQuery in your fiddle, you have things like:

    jQuery(".meta",this).fadeIn(400);
    

    That tells JQuery to look for .meta within this, and the keyword this is here referring to the JQuery object returned by the outer selector.

    In other words, if your outer selector is .mas, JQuery only searches for .meta within .mas. If the outer selector is .meta2, it only searches for .meta within .meta2. And, of course, .meta is within .mas, but it is not within .meta2, hence the issue you’re having.

    This can be fixed by simply removing the second parameter (this) from each fade call. So the line earlier becomes:

    jQuery(".meta").fadeIn(400);
    

    The updated fiddle is here: http://jsfiddle.net/qsQWU/1/

    Edit:

    As pointed out by the other answers and the question edit (thanks for the heads-up), I wasn’t thinking about the possibility of this needing to be done on multiple elements individually. They are correct; the above solution will not work for that scenario. Their alternatives work, but I also want to offer a third possibility: replacing this with jQuery(this).parent(), so that the context just becomes one level higher.

    The new fiddle, modified from the question edit, is here: http://jsfiddle.net/GU8Bj/

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

Sidebar

Related Questions

I am not a programmer, I just a web designer with a bit of
First of all, I'm not a web designer, I'm a programmer, so I'm working
I am a web designer and a PHP developer. I have created some websites
I am a web designer, and dont really know much about PHP. I have
Are Regular Expressions useful for a Web Designer (XHTML/CSS)? Can a web designer get
Firstly: I'm a lowly web designer who knows just enough PHP to be dangerous
I am more a web programmer than a designer, but currently my job requires
I'm a programmer, I can build a web site, but the pages looks ugly.
I'm in the design phase of a medium-sized PHP web application (not a static
I'm specificaally a photoshop web designer and have a limited knowledge of xaml. I'm

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.