Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-27-2011, 06:59 PM   PM User | #1
nmford
New to the CF scene

 
Join Date: Oct 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
nmford is an unknown quantity at this point
Problem with jQuery navigation menu

Hey guys,

I have a demo up here (Link) 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)

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

I added an extra line

Code:
    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 (Link), 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)
nmford is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:46 PM.


Advertisement
Log in to turn off these ads.