Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 486 Bytes

README.md

File metadata and controls

7 lines (5 loc) · 486 Bytes

javascript-tidbits

This repo contains JS functions that can be easily used in projects.

tabIndexEvent: Selects the active element, and adds an event listener so that the user can push the enter key or spacebar to activate the element. This is useful for elements that are set with tabIndex="0" (e.g. a link or button). Adds accessibility to elements.

This function has lines commented out that you can un-comment to test and see which elements will be active via console.log().