Skip to content

Commit 232a3f3

Browse files
committed
FIX: use touch detection for hamburger menu trigger
1 parent ddf79d4 commit 232a3f3

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ <h2>Contact</h2>
169169

170170
</div>
171171
<script>
172-
if (window.screen.width < 640) {
172+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
173173
var toggle = document.querySelector('.menu-toggle');
174174
var nav = document.querySelector('nav');
175175
toggle.style.display = 'block';

group.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ <h3>Alumni</h3>
379379

380380
</div>
381381
<script>
382-
if (window.screen.width < 640) {
382+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
383383
var toggle = document.querySelector('.menu-toggle');
384384
var nav = document.querySelector('nav');
385385
toggle.style.display = 'block';

hiring.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ <h2 class="red-title">All</h2>
256256

257257
</div>
258258
<script>
259-
if (window.screen.width < 640) {
259+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
260260
var toggle = document.querySelector('.menu-toggle');
261261
var nav = document.querySelector('nav');
262262
toggle.style.display = 'block';

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ <h3>Acknowledgements</h3>
309309

310310
</div>
311311
<script>
312-
if (window.screen.width < 640) {
312+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
313313
var toggle = document.querySelector('.menu-toggle');
314314
var nav = document.querySelector('nav');
315315
toggle.style.display = 'block';

publications.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ <h2>Publications</h2>
433433

434434
</div>
435435
<script>
436-
if (window.screen.width < 640) {
436+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
437437
var toggle = document.querySelector('.menu-toggle');
438438
var nav = document.querySelector('nav');
439439
toggle.style.display = 'block';

research.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ <h2>Collaborators</h2>
262262

263263
</div>
264264
<script>
265-
if (window.screen.width < 640) {
265+
if ('ontouchstart' in window || navigator.maxTouchPoints > 0) {
266266
var toggle = document.querySelector('.menu-toggle');
267267
var nav = document.querySelector('nav');
268268
toggle.style.display = 'block';

0 commit comments

Comments
 (0)