This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assign elements that you want to be tabbable a data-tabbable ="true" property. | |
// If elements are hidden, they won't be considered. | |
keepFocus = function($el){ | |
var tabbableEls = $el.parent().find($('[data-tabbable="true"]')); | |
$.each(tabbableEls, function(idx, el){ | |
$(el).attr({'tabindex': 0}); | |
}); |