js-track-focus
Check if the Child-Elements on any Parent have focus and aply CSS-Class on the Element
Usage
HTML
Menu Menu Menu Menu Menu Menu
JS
;// orvar elem = document;var trackfcs = elem focusClass: 'ui-state-hightlight'; // inittrackfcs;// destroytrackfcs;
Events
create
Fired once the Plugin is initialized.
;
focus-in
Fired when a child element has focus.
;
focus-out
Fired when a child element loses focus.
;
destroy
Fired once the Plugin is destroyed.
;
Package managers
- Install with Bower:
bower install js-track-focus --save
- Install with npm:
npm install js-track-focus
CDN
Release History
v1.0.0
: Initial release.
License
Licensed under the MIT license.