jQuery handing both focus and click on an element
I'm trying to determine workflow to fine-tune a data entry web application. Picture several address forms on a single web page: 1. Name___________ Street_________ Phone__________ 2. Name___________ Street_________ Phone__________ [...many more...] Now I'd like to know if the user is using the tab key to get to the second "Name" field (or anywhere within that record), or if they're using the mouse to click on it. (Or shift-tab to move in reverse.) I've set a handler on both focus and click for the input fields: $('input').click(function() { TabulateClick(this) }); $('input').focus(function() {