A while ago we added a button on one of our pages that takes you to the next logical place on the page. This button over time has moved and is far from the inputs it needs to take you to. The next logical enhancement for this button was to make it a hot key as well, so that is what I've done.
In addition to jQuery, which is already loaded on our pages we've added a small-ish (4.52KB, 1.95KB minified) library called, jquery.hotkeys.js. With a couple of lines I was able to add in a simple hot key combo that also takes you to the same logical spot on the page. This allows our users to keep their hands on the keyboard for better efficiency.
Example:
My musings while programming in a number of languages and libraries, from PHP, Perl, JavaScript, jQuery, and KnockoutJS, with liberal use of CSS and Bootstrap to make it all pretty.
2015-01-08
jQuery: Hot Keys!
Labels:
JavaScript,
jQuery
Location:
Milwaukee, WI, USA
2015-01-06
jQuery: Finding the first input with a class
Just a quick little snippet for finding the first input on the page with a specific class.
Labels:
JavaScript,
jQuery
Location:
Milwaukee, WI, USA
Subscribe to:
Posts (Atom)