Line | |
---|
1 | // Accessibility links thks to vie-publique.fr |
---|
2 | aFocus = 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 | $('#prelude a').removeClass('hidden'); |
---|
9 | $('#main-menu').css('padding-top', '4.5em'); |
---|
10 | } |
---|
11 | } |
---|
12 | } |
---|
13 | } |
---|
14 | // events onload |
---|
15 | function addLoadEvent(func) { |
---|
16 | if (window.addEventListener) |
---|
17 | window.addEventListener("load", func, false); |
---|
18 | else if (window.attachEvent) |
---|
19 | window.attachEvent("onload", func); |
---|
20 | } |
---|
21 | addLoadEvent(aFocus); |
---|
22 | |
---|
23 | // init |
---|
24 | $(function() { |
---|
25 | $('#main-menu').css('padding-top', '.5em'); |
---|
26 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.