Basically what I have is a textarea and then a list of the letters of the alphabet in <li> tags. What I want to do is whenever a particular key is pressed, a class is assigned to that li element. For example, whenever the letter c is pressed, a class is assigned to the <li>c</li> tag. Also, when the key is let off, that class gets removed.
Can someone help me get on the right track?
If I understand what you’re talking about, the following code should do the trick:
Great! I’m glad it helped. jQuery is great; no, jQuery is amazing. :D
Sorry to be so negative, but they guy is trying to learn about events and you completely overlooked event arguments that are passed with each keypress event.
Ya i dunno y it posted that, i posted the right one above. been havin some problems with this forum for some reason lately. Anyways changed it to what it was supposed to be. Anyone else having the issue where u need to log in like 3 times in order to post? lol. yes cookies are on. dunno 0_o
You must be logged in to reply to this topic.