[jQuery] Re: Help making this code snippet smaller...

2008-02-15 Thread Nazgulled
You are right, sorry. Thanks for all your help! On Feb 16, 12:02 am, Ariel Flesler <[EMAIL PROTECTED]> wrote: > I think you didn't check well, I removed comments and line breaks for > my own clarity, but you were using each and repeating $(this) and that > was unnecesary. > > Ariel Flesler > > N

[jQuery] Re: Help making this code snippet smaller...

2008-02-15 Thread Ariel Flesler
I think you didn't check well, I removed comments and line breaks for my own clarity, but you were using each and repeating $(this) and that was unnecesary. Ariel Flesler Nazgulled wrote: > I was looking for something more like this and not like your previous > post (remove comments, line-breaks

[jQuery] Re: Help making this code snippet smaller...

2008-02-15 Thread Nazgulled
I was looking for something more like this and not like your previous post (remove comments, line-breaks, I know how to do that lol...) On Feb 15, 6:36 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote: > Also you could add something like: > > function getFn( color ){ >return function(){ >$

[jQuery] Re: Help making this code snippet smaller...

2008-02-15 Thread Ariel Flesler
Also you could add something like: function getFn( color ){ return function(){ $(this).stop().animate({ color:linkColors[color] },150}; }; }; And then: $('#cpblock-links a').css('color', linkColors[0] ).hover( getFn(1), getFn(0) ); Ariel Flesler On 15 feb, 16:32, Ariel Flesler <

[jQuery] Re: Help making this code snippet smaller...

2008-02-15 Thread Ariel Flesler
function enableFadingLinks() { var linkColors = getColorsFromCSS('links'); if ( !linkColors) return; $('#cpblock-links a').css('color', linkColors[0] ).hover( function(){ $(this).stop().animate({ color: linkColors[1] }, 150); },