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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:13:02+00:00 2026-06-06T17:13:02+00:00

My aim is to create a navigation menu using jquery. when the user rollover

  • 0

My aim is to create a navigation menu using jquery. when the user rollover over left1, right 1 should appear and so forth. I am trying to code this in jquery but i am a little tied up. please assist

css

.left {
background: #fff;
padding: 10px;
width: 200px;
border: 1px solid #ccc; 
position:relative

}
.right{
background:aqua; 
 height:270px;
width:200px; 
float:right; 
visibility:hidden

}

html

 <div class="left" id="left1">left 1</div>
 <div class="left" id="left2">left 2</div>
 <div class="left" id="left3">left 3</div>
 <div class="left" id="left4">left 4</div>

<div class="right" id="r1">right 1</div>
<div class="right" id="r2">right 2</div>
<div class="right" id="r3">right 3</div>
<div class="right" id="r4">right 4</div>

jquery

$(document).ready(function(){ 
function rightFrame(){
$('#r1').css({
        'position':'absolute',
        'top':'40px',
        'left':'300px',
        'visibility':'visible'  
        }); 
$('#r1').show();

}
$('#left1').mouseover(function(e){ 
 $("#left"+ID).css('background','red'); 
}); 
$('.left').mouseout(function(e){ 
$('.right').hide(); 
}); 
});

my question may seem a little off but i hope you can understand my aim. thanks

  • 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-06T17:13:04+00:00Added an answer on June 6, 2026 at 5:13 pm

    You have a few fundamental problems here.

    1. ID is undefined.
    2. You have a function named rightFrame() but you are not calling it anywhere in the script.
    3. You should use classes and $(this) to open and close menu items instead of IDs.

    Here is a Fiddle to show you an easy fix: http://jsfiddle.net/PFnDe/1/

    EDIT: I guess I should post my JS here too.

    function rightFrame(e) { // Moved this outside of DOM ready function.
        $('#' + e).css({
            'position': 'absolute',
            'top': '40px',
            'left': '300px',
            'visibility': 'visible'
        });
        $('#' + e).show();
    }
    
    $(document).ready(function() {
        $('.left ').mouseover(function(e) {
            rightFrame($(this).data('item')); // Added this
            $(this).css('background-color', 'red');
        });
        $('.left ').mouseout(function(e) {
            $('.right ').hide();
            $(this).css('background-color', '#fff'); // Added this
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My overall aim is to create an editor which I can skin using jQuery
What I can do: I aim to create a view where a User Control
I am set to create a file explorer using Java. The aim is to
My aim is to create an application whereby a user can drag a label
I am trying to create a logic switch in Javascript. The aim is to
I need to create installer using MSI whose aim would be to invoke correct
Aim: to create user friendly web interface to linux program without any ssh (console)
is it possible to create a horizontal flyout menu without using float ? I
My aim is to create a map function like this map = function ()
My aim is to create a status bar application which will draw drop down

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.