View Single Post
10-03-2010, 03:57 AM
#1
Matt is offline Matt
Matt's Avatar
Status: Member
Join date: Jan 2006
Location: Indiana, USA
Expertise:
Software:
 
Posts: 419
iTrader: 1 / 100%
 

Matt is on a distinguished road

Send a message via AIM to Matt Send a message via MSN to Matt Send a message via Yahoo to Matt

  Old  jQuery + Color plugin, help anyone?

Hey,

On a navigation link I'm using a hash to point to a div, so when clicked it scrolls, changes the background color, and then fades back to normal. This should be simple but it's not working?

I'm using jQuery 1.4.2, the jQuery Color plugin, and window.location.hash for the highlighting.

Code:
$(document).ready(function(){
    if(window.location.hash === '#services') {
        var service = $('#services');
        var originalColor = service.css('background-color');

        service.css('background-color', '#FFEE9F').animate({
            'background-color': originalColor
        }, 3000);
    }
});
Where'd I screw up?

Reply With Quote