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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:04:20+00:00 2026-05-27T06:04:20+00:00

I have a demo up here so you can look at all the html

  • 0

I have a demo up here so you can look at all the html and javascript involved.

Problem:

The problem I’m having is that at the moment, when you hover over a link (other than home) and then move the mouse anywhere else on the screen (except over the home link) the home link isn’t reverting to the white text color.

I tried to resolve the problem by changing the following piece of code (look in the “example.js” file linked to from the page to view full code):

if (status == "off")
{
$(this).stop().animate({ color: linkcol },500);
}

I added an extra line

if (status == "off")
{
$(this).stop().animate({ color: linkcol },500);
$(".current_page_item_two a").stop().animate({ color: whitecol },500);
}

This line was intended to set the link inside the current_page_item_two element back to white when no link is hovered over (when the slider returns to the home link).

However, looking at the demo here, you can see that this creates some horrible glitches in the nav (wiggle the mouse about over the links to see what I mean, I end up causing some issue where the white rollover animations don’t work at all)

Also, as a side note, why are my callback functions when animating the hover rectangle being called before the animation is complete? I’m new to jquery and I was under the impression that the fourth parameter was a function to be called when the animation was complete.

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-05-27T06:04:21+00:00Added an answer on May 27, 2026 at 6:04 am

    Your code is needlessly complex. I refactored what you want to do into a very simple jQuery plugin. If you want I encourage you to look into css3 animations to make it even smaller (although you might want to maintain cross browser compat). The code is still a little more complex than it needs to be, although that is more due to me not having much time at the moment. You can see the solution here:

    http://jsfiddle.net/hGm7M/3/

    Edit: updated url to add resetting slider to home and changing slider width

    If you have any questions feel free to ask.

    Notes:

    • You could move all the css into the jQuery plugin making it a self contained widget
    • You could separate the slider from the color system, although in this case I am not sure if it’s worth it
    • Right now I don’t set the colours in css for simplicity which means browsers without javascript will just get default coloured links. There are a number of solutions to this, but it depends on what you want to do. I tend to prefer the widget style of things, so I would serve a html menu to the client and then replace it with a js widget with all its own styling et all. This way you have graceful degradation, but the code is still simple and strait-forward.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE : look at the demo here: http://amit-verma.com/template_test/ i am having a slight problem
I have a plugin that changes the look of select html tag on all
I am using the localStorage in this demo here, http://help.arcgis.com/en/webapi/javascript/arcgis/demos/exp/exp_webstorage.html Basically it is a
Hope you can have a quick look at what I'm doing here. Essentially, am
I have a demo here how can I put some space around the texts
I have got a demo script that lets me authorize with my app and
I have created the following demo: http://thedrivepartnership.com/overflow.html The scrolls expand fine in FireFox /
I have a very simple demo working that uses Webkit transforms and transitions for
I've searched the internet and can't find anything that works here. My footer is
Here I have a demo of Jquery slideToggle core working on an element, but

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.