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.
If I understand what you’re talking about, the following code should do the trick:
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.
You shouldn’t be sniffing "navigator.appName" just to target a specific property (entirely unrelated). Instead you should be checking for the existence of either property and then using whichever one is available.
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
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".