Unit 3 Events


#1

Hey!

In this course, I was introduced to the function keypress and in the jQuery course, I was shown the keydown function. What is the difference between these two functions? Thanks.


#2

Hi Tyoungg,

keydown() and keyup() return the keycode, which is the same whether the character is uppercase or lowercase. keypress() returns the character code, which changes between uppercase and lowercase.
I hope this helps :slightly_smiling: