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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:40:44+00:00 2026-06-13T05:40:44+00:00

I am currently working with jquery and <a> tags. Right now I have been

  • 0

I am currently working with jquery and <a> tags. Right now I have been able to get an image displayed everytime I mouse hover an tag. I am struggling with the part of actually displaying text underneath the picture that corresponds to the right <a> tag. How can I display a corresponding <legend> underneath each picture during the mouse hover? Show one legend at a time along with the matching picture. Here is my EXAMPLE

Code Jquery

<script>
$(document).ready(function () {
var $images = $("div#images");
var $currentImage = $images.children("img#cheeseburger");

$currentImage .show();

$("div#links > a").mouseenter(function() {
    var ID = $(this).data("content");
    var $image = $images.children("img#" + ID);

    if (!$image.is($currentImage)) {
        $currentImage.hide();
    }

    $currentImage = $image;
    $image.stop(true, true).fadeIn("slow");
});

});
</script>

HTML

<div id="links">
    <h2> Select A Category </h2> 
    <a href="example.htm" class="large magenta awesome" data-content="cheeseburger">Cheeseburger »</a>
    <a href="example.htm" class="large blue awesome" data-content="tacos">Tacos »</a>
    <a href="example.htm" class="large red awesome" data-content="salads">Salads »</a>
</div>
<center>
    <br />
    <div id="images">
        <img src="images/cheeseburger.jpg" id="cheeseburger">
        <img src="images/tacos.jpg" id="tacos">
        <img src="images/salad.jpg" id="salads" >
    </div>      
</center>

<fieldset class="el05">
        <legend style="font-size:15px;"><b>Cheeseburger:</b></legend>
        <p> Example one</p>
</fieldset>

<fieldset class="el05">
        <legend style="font-size:15px;"><b>Tacos:</b></legend>
        <p> Example two.</p>
</fieldset>

<fieldset class="el05">
        <legend style="font-size:15px;"><b>Salad:</b></legend>
        <p> Example three.</p>
</fieldset>
  • 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-13T05:40:45+00:00Added an answer on June 13, 2026 at 5:40 am

    try something like this i have just implemented on one

     <fieldset class="cheeseburger">
        <legend style="font-size:15px;"><b>Cheeseburger:</b></legend>
        <p> Example one</p>
    </fieldset>
    
    
    <script>
     $(document).ready(function () {
     var $images = $("div#images");
     var $currentfieldset = $(".cheeseburger");
     var $currentImage = $images.children("img#cheeseburger");
    
     $currentImage .show();
    
      $("div#links > a").mouseenter(function() {
       var ID = $(this).data("content");
       var $image = $images.children("img#" + ID);
        var $fieldset = $('.' + ID);
    
       if (!$image.is($currentImage)) {
          $currentImage.hide();
       }
       if (!$fieldset .is($currentfieldset)) {
          $currentfieldset.hide();
       }
    
       $currentImage = $image;
      $fieldset.show();
      $currentfieldset= $fieldset ;
       $image.stop(true, true).fadeIn("slow");
     });
    
     });
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently working on rails3 application that uses jQuery. I have a javascript
I'm currently working on a JQuery game (Just to get around with using JQuery)
I'm currently working with jQuery and using the datepicker. I have two input fields:
I have currently been working on a web application which features a dynamically updating
im currently working with jQuery ajax and i get some unexpected error. I use
I'm currently working with jQuery 1.4.2 and jQuery UI 1.8.2. I'm experiencing some weird
I'm currently working on a jQuery script that will translate the site's text into
I am currently working with the jQuery validation plugin , and I want to
Currently all working with my jquery $.post actions, successful connections, query and json_encode return
Currently working for the first time with JSON and with little experience of jQuery.

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.