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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:27:06+00:00 2026-05-13T06:27:06+00:00

I am trying to create an effect where if you hover over an img,

  • 0

I am trying to create an effect where if you hover over an img, the color of text will change below it. And also, when you mouseout, the color will change back to its original color. The page is: http://vitaminjdesign.com/work.html

My code is:

    if(window.jQuery){jQuery(function(){

        (function(){ jQuery('div#one img').bind('mouseover', function(event, ui){var target = jQuery('div#one h2'); target.animate({'color':'#111111'},250,'linear')});})();

    })};

I repeated this about 15 times in a page, and it seems to be pretty buggy, and not smooth. Playt around with it for a minute. Is there a better way of going about this?

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

    Try using hover, the benefit being that you can specify the mousein and mouseout events in the same function. If you need any help with specifically how to apply what you’ve got to the hover event, just comment and I’ll see what I can do.

    EDIT:

    Ok, the code on your site already has this

    //On mouse over those thumbnail
    $('.zitem').hover(function() {
    
        //Set the width and height according to the zoom percentage
        width = $('.zitem').width() * zoom;
        height = $('.zitem').height() * zoom;
    
        //Move and zoom the image
        $(this).find('a img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
    
        //Display the caption
        $(this).find('div.caption').stop(false,true).fadeIn(200);
    },
    function() {
        //Reset the image
        $(this).find('a img').stop(false,true).animate({'width':$('.zitem').width(), 'height':$('.zitem').height(), 'top':'0', 'left':'0'}, {duration:100});    
    
        //Hide the caption
        $(this).find('div.caption').stop(false,true).fadeOut(200);
    });
    

    I’m going to add two lines into this code that do what you want

    //On mouse over those thumbnail
    $('.zitem').hover(function() {
    
        //Set the width and height according to the zoom percentage
        width = $('.zitem').width() * zoom;
        height = $('.zitem').height() * zoom;
    
        //Move and zoom the image
        $(this).find('a img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
    
        //Change the header colour
        $(this).siblings('h2').animate({'color':'#111111'},250,'linear');
    
        //Display the caption
        $(this).find('div.caption').stop(false,true).fadeIn(200);
    },
    function() {
        //Reset the image
        $(this).find('a img').stop(false,true).animate({'width':$('.zitem').width(), 'height':$('.zitem').height(), 'top':'0', 'left':'0'}, {duration:100});    
    
        //Change the header colour back
        $(this).siblings('h2').animate({'color':'#EE4E07'},250,'linear');
    
        //Hide the caption
        $(this).find('div.caption').stop(false,true).fadeOut(200);
    });
    

    That should do it

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

Sidebar

Related Questions

I have been trying to create a border-color change hover effect with CSS and
I'm trying to create an effect where rolling the mouse over some text will
I'm trying to create an effect where when you hover over a list item
I am trying create the image enlargement effect when you hover your mouse over
I am trying to create following effect: when I hover over my link, that
I'm trying to create a slick fade in/fade out effect when users hover over
I am trying to create a hover effect (with html and CSS below). The
I am trying to create sliding images effect: Online demo link text . The
I'm trying to create an effect where if the user hovers the mouse over
I am trying to create an effect when you place the mouse cursor over

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.