I am selecting all tags that are not input tags to bind a hotkey to.
$('*').not('input').bindHotKey(blah);
However, this doesn't seem to excl开发者_开发百科ude the password field in chrome. ie: <input type="password"/>
Try to only select the descendants of the body
element:
$('body *').not('input').bindHotKey(blah);
DEMO
Update:
But it even seems to work with $('*')
. Have a look at this fiddle. Without not
there are 11 elements in the page, with not
, 10.
精彩评论