OK, so this sounds simple, using jquery’s ‘click’ function.
The thing is I want the ORIGINAL color of the link NOT its hovered color – e.g. if the link is green with a hover state of orange, I wat to grab the GREEN color.
I’ve tried as best as I can and shown it in a fiddle
Anyone got any ideas?
EDIT: apologies, but as a number of eagle eyes have spotted (thanks to them for pointing it out) green is actually “rgb(0, 128, 0)”, NOT rgb(0, 255, 0) as shown in my original fiddle.
Store it in jQuery’s
dataobject:Here’s your fiddle: http://jsfiddle.net/sVDYe/4/
For better performance, I’d use the static methods in the loop. They’re much faster:
Here’s the fiddle: http://jsfiddle.net/sVDYe/13/