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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:22:58+00:00 2026-06-02T03:22:58+00:00

i have a question: i have an inline navigation menu: <nav> <div id=highlight></div> <ul

  • 0

i have a question:
i have an inline navigation menu:

<nav>
    <div id="highlight"></div>
    <ul id="fs_nav">
         <li class="_nav"><a href="#" title="Home" alt="Home">Home</a></li>
         <li class="_nav second"><a href="#" title="About" alt="About">About Us</a></li>
         <li class="_nav second"><a href="#" title="News" alt="News">News</a></li>
         <li class="_nav second"><a href="#" title="Contacts" alt="Contacts">Contacts</a></li>
         <li class="_nav second"><a href="#" title="Projects" alt="Projects">Projects</a></li>
         <li class="_nav second"><a href="#" title="Donations" alt="Donations">Donations</a></li>
     </ul>
</nav>

The “highlight” div is an absolute-positioned div that has to highlight the pointed li elements of the navigation moving horizontally.

Now i would like to move it following the mouse position.

I coded this

// JavaScript Document
$(function() {
// Highlight Moving
var interval;
    $('nav').hover(function(e){
    interval = setInterval(UpdateX(e),100);
    },
    function(){
        clearInterval(interval);}
       );
    }
);

Where UpdateX function is:

function UpdateX(e) {
var width = $('#highlight').width();
var left = e.pageX;
$('#highlight').animate({
    left:left - (width/2)
}
);
}

But this works just once, when you put the mouse inside “nav”. If you want to update the div position you must put out of “nav” the pointer and re-hovering on it.

How can i solve?
Hope to have been clear…

Thanks in Advance

  • 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-02T03:23:01+00:00Added an answer on June 2, 2026 at 3:23 am

    I have an example of this functionality here: http://code.coloresefimeros.com/slide-hover.html

    Take a look at the sample code, it will help you with this (JS file involved is http://code.coloresefimeros.com/js/slide-hover.js)

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

Sidebar

Related Questions

The question might be a little bit confusing. I have an inline div and
I have question regarding the SQLAlchemy. How can I add into my mapped class
Suppose we have a class like: Public Class Question Private Shared _field as Integer
My ultimate aim is to have an inline div on my page which horizontally
I have a question, how can I do something like this: header("Content-Disposition: inline; filename=result.pdf");
Ok so the question is simple: I have a variable width and height div
I have a header file with some inline template methods. I added a class
Question as above, more details below: I have a class Money to deal with...
[Updated]: Answer inline below question I have an inspecting program and one objective is
I have question regarding the use of function parameters. In the past I have

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.