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

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

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

All overlapping substrings matching a java regex -