[jQuery] Newbie Question with Hot Keys
Hi,
I've been having a bit of trouble with this bit of code and I was
wondering what I am doing wrong in the chaining...
I am using the js-hotkeys plugin to allow keypress events only while
hovering over a specific class. However, I would like the effects
only to be applied to it's id.
How can I pass down the id or other self referencing attribute so that
the toggle() only applies to that specific element?
Below is a code snippet.
$('.position_info').hover(function(e) {
$(document).bind('keypress', 'space', function(e){
$(e).children("strong").toggle();
});
}, function(){
$(document).unbind('keypress', 'space');
});
Thanks in advance for any help or just reading this.