On Wed, Dec 17, 2008 at 11:46 AM, sshefer <shai.she...@gmail.com> wrote: > > Hi, > > Im using the js-hotkeys plugin with a hover but am running into some > issues. > > The below code runs well but, obviously, selects all of my > "position_info" classes. I'd like to be able to specify $(this) so > that the effect is only applied to the element I am hover over. Am I > going about this completely wrong? Is there a better way of doing it? > > $('.position_info').hover(function() { > $('.position_info').bind('keydown', {combi:'space', disableinInput: > true}, function(){ > $('.position_info').children('strong').toggle(); > }); > }, function(){ > $('.position_info').unbind('keydown', {combi:'space', > disableinInput: true}); > }); >
try this: $('.position_info').hover(function(e) { var target = e.target; target.bind('keydown', ...