Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 278: Line 278:
$(function() {
$(function() {
 +
  var touchscreen = ("ontouchstart" in document.documentElement);
   var menu_buttons = document.getElementsByClassName("menu_button");
   var menu_buttons = document.getElementsByClassName("menu_button");
   for (var i = 0; i < menu_buttons.length; i++) {
   for (var i = 0; i < menu_buttons.length; i++) {
Line 305: Line 306:
           }
           }
       }
       }
 +
      if (touchscreen) continue;
       menu_buttons[i].onmouseover = (function() {
       menu_buttons[i].onmouseover = (function() {
         var children = menu_buttons[i].childNodes;
         var children = menu_buttons[i].childNodes;

Revision as of 18:35, 3 October 2013