MCPcopy
hub / github.com/jdan/cleaver / updateTabIndex

Function updateTabIndex

resources/script.js:64–77  ·  view source on GitHub ↗

* Removes tabindex property from all links on the current slide, sets * tabindex = -1 for all links on other slides. Prevents slides from appearing * out of control.

()

Source from the content-addressed store, hash-verified

62 * out of control.
63 */
64function updateTabIndex() {
65 var allLinks = document.querySelectorAll('.slide a');
66 var position = currentPosition();
67 var currentPageLinks = document.getElementById('slide-' + position).querySelectorAll('a');
68 var i;
69
70 for (i = 0; i < allLinks.length; i++) {
71 allLinks[i].setAttribute('tabindex', -1);
72 }
73
74 for (i = 0; i < currentPageLinks.length; i++) {
75 currentPageLinks[i].removeAttribute('tabindex');
76 }
77}
78
79/**
80 * Determines whether or not we are currently in full screen mode

Callers 2

navigateFunction · 0.85
script.jsFile · 0.85

Calls 1

currentPositionFunction · 0.85

Tested by

no test coverage detected