Q:

checked a element is focused with its key pressed

$(window).keyup(function (e) {
    var code = (e.keyCode ? e.keyCode : e.which);
    if (code == 9 && $('#detect:focus').length) {
        alert('I was tabbed!');
    }
});
0

Tags

New to Communities?

Join the community