Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

keydown on document is not working when clicked on page?

, 7 Nov 2012 CPOL
I am using$(document).keydown(function (event) { alert(event.keyCode);});This function works great when the page is loaded..Now when i click on any part of the page and then when i press any key this event is not firing and alert does not come..Why?

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 7-Nov-12 8:07 Available Ravi Tuvar
Updates in content. 22 changes had been made.
1 No 7-Nov-12 8:06 Available Ravi Tuvar

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ravi Tuvar
Technical Lead IntelliMedia Networks, Inc
India India
No Biography provided
Follow on   Twitter   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150414.1 | Last Updated 7 Nov 2012
Article Copyright 2012 by Ravi Tuvar
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid