- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 09 May 2011 05:01:41 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec-author-view In directory hutz:/tmp/cvs-serv16913 Added Files: jump-indexes.js Log Message: updated --- NEW FILE: jump-indexes.js --- var jumpIndexAbutton = document.getElementById('jumpIndexA-button'), jumpIndexA = document.getElementById('jumpIndexA'); document.addEventListener('click', window.showjumpIndexA , false); document.addEventListener("keydown", function (e) { if (!e) { e = window.event; } var key = e.keyCode ? e.keyCode : e.which; if (key === 27 && jumpIndexA) { jumpIndexAbutton.firstChild.textContent = "jump"; jumpIndexA.style.display = "none"; } if (key === 32 || key === 13) { window.showjumpIndexA(e); if (e.target.id === "jumpIndexA-button") { e.preventDefault(); e.stopPropagation(); e.returnValue = false; e.cancelBubble = true; return false; } } }, true); function showjumpIndexA(event) { if (jumpIndexA.style.display === "block") { jumpIndexA.style.display = "none"; jumpIndexAbutton.firstChild.textContent = "jump"; } else { jumpIndexA.style.display = "block"; jumpIndexAbutton.firstChild.textContent = "(ESC to close)"; } }
Received on Monday, 9 May 2011 05:01:42 UTC