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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:26:12+00:00 2026-05-29T06:26:12+00:00

This is the code in my html file: <div id=centerBlock> <block> <site style=padding-top: 10px;

  • 0

This is the code in my html file:

    <div id="centerBlock">
        <block>
            <site style="padding-top: 10px; margin-left: 20px">
                <img src="./images/site1.png" alt="some_text"/>
            </site>
            <textOnImage style="padding-top: 10px; margin-left: 20px">
                lolol
            </textOnImage>
        </block>

        <block>
            <site style="padding-top: 163px; margin-left: 20px">
                <img src="./images/site1.png" alt="some_text"/>
            </site>
            <textOnImage style="padding-top: 163px; margin-left: 20px">
                lolol
            </textOnImage>
        </block>

    </div>

And this is my javascript:

$("block").mouseenter(function(){        
    $("site").fadeTo("slow", 0.25);
    $("textOnImage").animate({ 
        opacity: "1"
    }, 600 );
});

$("block").mouseleave(function(){         
    $("site").fadeTo("slow", 1);
    $("textOnImage").animate({ 
        opacity: "0"
    }, 600 );
 });

However, when I hover over one of the two block elements they both go down in opacity and when I move my mouse away from it than they both go back to the original state. I’ve searched for hours, and I’m 100% sure I’ve been searching the incorrect terms. How do I do them individually?

  • 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-29T06:26:13+00:00Added an answer on May 29, 2026 at 6:26 am

    Use this to target only the block that triggered the event and then use .find() to find the desired element in that specific block. The way you were doing it before was obviously finding all site elements and all textOnImage elements in the whole page not only the ones in the block that triggered the event.

    $("block").mouseenter(function(){        
        var $this = $(this);
        $this.find("site").fadeTo("slow", 0.25);
        $this.find("textOnImage").animate({ 
            opacity: "1"
        }, 600 );
    });
    
    $("block").mouseleave(function(){         
        var $this = $(this);
        $this.find("site").fadeTo("slow", 1);
        $this.find("textOnImage").animate({ 
            opacity: "0"
        }, 600 );
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in index.html file: $(function(){ $('a#link').live('click', function(e){ $(div#element).load(file.html); }); }); In
i am trying to use this code: <%= File.ReadAllText(Server.MapPath(Members/newsletters/welcome.html))%> which works great but now
I have javascript code embedded inside a html template file. When I load this
I pasted the code given in this link to a file called md5.js. http://www.webtoolkit.info/javascript-md5.html
I have this HTML code: <div class='com_box'> <div class='com_box_c'> <div class='com_box_info'> <a id='quote'>quote</a> </div>
What am I doing wrong in this HTML code: <html> <head> </head> <body> <div
In my html file, when I write this, it is displayed correct. <div class=event
this is in html file. <div class=pageNavPosition></div> <table></table> <div class=pageNavPosition></div> <script> showPageNave('pager','pageNavPosition'); </script> this
I have this code: reg = re.search('<div class=col result_name>(.*)</div>', html) print 'Value is', reg.group()
I get code from a website, something like (file name: index.php): <html> <body> <div

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.