comparison www/m/js/nodescore-client.js @ 19:a56434dee146

toggleable divs and clean up
author tzara <rc-web@kiben.net>
date Mon, 09 Jul 2012 19:18:47 +0100
parents 6ad0cde69558
children 9daa1ac0af33
comparison
equal deleted inserted replaced
18:6ad0cde69558 19:a56434dee146
96 else 96 else
97 e.style.display = 'block'; 97 e.style.display = 'block';
98 } 98 }
99 99
100 $(document).keypress(function(e){ 100 $(document).keypress(function(e){
101 // "space bar" for next unit preview
101 var checkWebkitandIE=(e.which==32 ? 1 : 0); 102 var checkWebkitandIE=(e.which==32 ? 1 : 0);
102 var checkMoz=(e.which==32 ? 1 : 0); 103 var checkMoz=(e.which==32 ? 1 : 0);
103 if (checkWebkitandIE || checkMoz) { 104 // "m" button for metronome
104 toggle_visibility('preview') 105 var mcheckWebkitandIE=(e.which==109 ? 1 : 0);
105 } 106 var mcheckMoz=(e.which==109 ? 1 : 0);
107 // "s" button for stopwatch/chronometer
108 var ccheckWebkitandIE=(e.which==115 ? 1 : 0);
109 var ccheckMoz=(e.which==115 ? 1 : 0);
110
111 // "h" button for hideall
112 var hcheckWebkitandIE=(e.which==104 ? 1 : 0);
113 var hcheckMoz=(e.which==104 ? 1 : 0);
114
115 console.log(e.which);
116 if (checkWebkitandIE || checkMoz) { toggle_visibility('preview') }
117 if (mcheckWebkitandIE || mcheckMoz) { toggle_visibility('metro') }
118 if (ccheckWebkitandIE || ccheckMoz) { toggle_visibility('client_chronometer') }
119 if (hcheckWebkitandIE || hcheckMoz) {
120 toggle_visibility('client_chronometer')
121 toggle_visibility('metro')
122 toggle_visibility('preview')
123 }
106 }); 124 });
107 125
108 //////////////////////////////////////////////// 126 ////////////////////////////////////////////////