Pipeline update.
[copyspeak.git] / src / copyspeak / static / js / word_detail.js
1 document.onkeydown = function(e) {
2     if (!e) e = window.event;
3     var keynum = e.keyCode ? e.keyCode : e.which; // IE vs others
4     switch (keynum) {
5         case 37:
6             var link = document.getElementById('previous-card');
7             link.setAttribute('class', 'active');
8             location.href = link.getAttribute('href');
9             return false;
10         case 39:
11             var link = document.getElementById('next-card');
12             link.setAttribute('class', 'active');
13             location.href = link.getAttribute('href');
14             return false;
15     }
16 };