binding - Jquery.Hotkeys behaviour -


i decent javascript programmer, not have deep understanding of dom, question should simple programer, hope.

i trying use jquery.hotkeys lib. here's noticed:

if do:

$(document).ready( function(){ $(document).bind('keydown', 'ctrl+q', alertworld); }); 

it works perfectly. when do

$(document).bind('keydown', 'ctrl+q', alertworld); 

it binds every single keydown press alertworld function. want understand why behaves so. imagined should work fine in second code example. please help. thanx in anticipation


Comments

Popular posts from this blog

All overlapping substrings matching a java regex -

c++ - Using OpenSSL in a multi-threaded application -

php - Deleting/Renaming a locked file -