问题
I am using the jquery.keynav plugin to perform navigation on a webpage using the five keys. The problem resides in the fact that I am using a highlighter div which guides the user through the web page what ever is in the div (text etc) can be fetched and several operations may be performed but the highlighter div is not working rather it is contained at the top left corner of the web page(any web page). Here is the code. The code was added to move the highlighter.
var offset = $('.'+e.onClass).offset();
$('#monitor').html($.htmlClean($('.'+e.onClass).html()));
$('#highlighter').animate({'height' : $('.'+e.onClass).height() + 10, 'left' : (offset.left - 6) + 'px', 'top' : (offset.top - 10) + 'px', 'width' : $('.'+e.onClass).width() + 12 }, 300);
//$('#highlighter').scrollIntoView(true);
Editor: This seems to be a continuation of keynav jquery plugin not working
来源:https://stackoverflow.com/questions/6109193/jquery-keynav-not-working-after-adding-new-code