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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:02:33+00:00 2026-06-11T02:02:33+00:00

I have two DIV elements. Inside DIV_1 i want certain images to be display

  • 0

I have two DIV elements.
Inside DIV_1 i want certain images to be display when called upon, in DIV_2 i will have many LINKS.

When each individual LINK in DIV 2 is hovered I want the link-related image to appear in DIV 1, then change to another pic if another LINK is hovered, but also make it disappear when the mouse arrow doesn’t hover over the specific LINK.

Javascript

function showIt(imgsrc) 
{
    document.getElementById('bottle').src=imgsrc;
    document.getElementById('bottle').style.display='block';
}

function hideIt()
{
    document.getElementById('bottle').style.display='none';
}
  • 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-06-11T02:02:35+00:00Added an answer on June 11, 2026 at 2:02 am

    Add to your links this code :

    <a href="#" onmouseover="showIt('some_image.jpg')" onmouseout="hideIt()" >...</a>
    

    However it wont look pretty. Consider using jQuery.

    EDIT:

    Using jQuery you could do this way:

    HTML:

    <a href="#" data-src="some.jpg" class="changeImage" >...</a>
    <a href="#" data-src="another.jpg" class="changeImage" >...</a>
    ...
    <img class="bottle" />
    

    JavaScript

    $(function(){
      $('.changeImage').hover(function(){
             $('.bottle').attr('src',$(this).attr('data-src'));
             $('.bottle').show();
         },
         function(){
             $('.bottle').hide();
         });
    
    })
    

    You can adjust animation speed by providing animation time as argument to show() and hide().
    URL for images put in data-src attributes of a tags.

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

Sidebar

Related Questions

I have two HTML elements inside a div. I want to display them in
I have a container DIV. Inside the container are three elements. Two banner DIV's
I have a <div> with two floated elements inside of it. I'm using jQuery
I have two input elements inside a div (a textbox and an image), intended
I have two HTML div elements, one source one destiny; inside of each one
I have two div elements inside another. At times, from user interactivity, these two
I have two div elements that are twins (i.e. their dimensions and contents are
I have two div -elements, the top one has the height of 40% and
I have one parent DIV inside parent DIV i have two DIV one in
I have two MAIN DIVs inside a DIV which is a PART of the

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.