Home › Forums › JavaScript › Key press adds class to element › Re: Key press adds class to element
April 22, 2009 at 8:41 pm
#56657
akeenlabs
Participant
If I understand what you’re talking about, the following code should do the trick:
Code:
- c
- d
This uses the jQuery JavaScript library, but all of this would still be possible otherwise, but much harder. If I need to explain the code, just let me know. Sometimes I know I just want to see a working example and I’d rather find out how it works myself (hopefully it will work, I only tested it in Firefox).