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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:38:40+00:00 2026-05-20T20:38:40+00:00

I have this code : function move() { $(document).mousemove(function(e){ var x = e.pageX; $(‘.linkHover’).animate({‘right’:

  • 0

I have this code :

function move() {

    $(document).mousemove(function(e){
         var x = e.pageX;
        $('.linkHover').animate({'right': '=' + x + 'px'}, 'slow'); 
   }); 


    }

and the HTML is :

<div style="position: relative">
    <ul class="linksColl">
        <li><a href="#"><img onmouseover="move()" src="images/links/communicate.png" alt="" width="175" height="78" border="0" /></a></li>
        <li><a href="#"><img onmouseover="move()" src="images/links/library.png" alt="" width="125" height="79" border="0" /></a></li>
        <li><a href="#"><img onmouseover="move()" src="images/links/memory.png" alt="" width="176" height="78" border="0" /></a></li>
        <li><a href="#"><img onmouseover="move()" src="images/links/discussions.png" alt="" width="137" height="78" border="0" /></a></li>
        <li><a href="#"><img onmouseover="move()" src="images/links/about.png" alt="" width="126" height="78" border="0" /></a></li>
        <li><a href="index.php"><img onmouseover="move()" src="images/links/articles.png" alt="" width="125" height="78" border="0" /></a></li>
    </ul>
    <div class="linkHover"></div>
</div>

I want to change the position for DIV with class linkHover when mouse over header links but it’s not working.

How I can let the linkHover DIV follow mouse cursor when become on linksColl DIV?

NOTE : I want to follow only horizontal not vertical

  • 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-20T20:38:41+00:00Added an answer on May 20, 2026 at 8:38 pm

    SzamDev,

    Try this JS

    function move() {    
        $(document).mousemove(function(e){
            var x = e.pageX;
            $('.linkHover').animate({right:x}, 'slow'); 
        }); 
    }
    

    also, if I understand you right, I did something very similar. Try plotting the X co-ord for each LI, then adding to an array, With the mouse over, set a JS call with an index of the li you wish to animate to. This worked perfectly for me.

    var dotLocations = [0, 55, 170, 290, 410];
        function showFeature(a) {
            $("#featureDot").animate({
                left: dotLocations[a]
            }, 150, function () { /* animation complete */ });
        } 
    

    In this example the featureDot was a div with a small red dot in it, when “showFeature” was called the dot moved to be located under the li/button I clicked/hovered.

    Hope this helps,

    Chris.

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

Sidebar

Related Questions

I have this piece of code: $(#faq).click(function () { var url = $.get(faq, {
I have this piece of code: var myObj = function () { this.complex =
So I have this code: $(document).ready(function() { $(document).keypress(function(e) { switch(e.which) { // user presses
I am using canvas,and I have this code - var myCanvas = document.getElementById(myCanvas), ctx
I have this code: dojo.declare(City, null, { constructor : function(cityid, cityinfo){ } }); dojo.declare(TPolyline,
i need help with disk_total_space function.. i have this on my code <?php $sql=select
I have this function in my Javascript Code that updates html fields with their
I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
Have the following JS included in my HTML: document.observe('dom:loaded', function() { Event.addBehavior( { 'a.move-up:click':
Let's assume that we have simple jQuery code like the following: var $document =

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.