Dotclear

source: admin/js/prelude.js @ 447:012faa0e1648

Revision 447:012faa0e1648, 544 bytes checked in by kozlika, 14 years ago (diff)

[Accessibility] Add skip links (aka prelude), first in source.

Line 
1// Accessibility links thks to vie-publique.fr
2aFocus = function() {
3     if(document.getElementById("prelude")) {
4          var aElts = document.getElementById("prelude").getElementsByTagName("A");
5          for (var i=0; i<aElts.length; i++) {
6               aElts[i].className="hidden";
7               aElts[i].onfocus=function() {
8                    this.className="";
9               }
10          }
11     }
12}
13// events onload
14function addLoadEvent(func) {
15     if (window.addEventListener)
16          window.addEventListener("load", func, false);
17     else if (window.attachEvent)
18          window.attachEvent("onload", func);
19}
20addLoadEvent(aFocus);
Note: See TracBrowser for help on using the repository browser.

Sites map