Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 106,575
Total Posts: 592,698
There are 106 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

jQuery + Color plugin, help anyone?

Thread title: jQuery + Color plugin, help anyone?
Reply    
    Thread tools Search this thread Display Modes  
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
10-03-2010, 06:06 AM
#2
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

Eh, never mind. I see what I forgot, doh! It's been a long night...

Reply With Quote
Reply    


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed