Template:Team:Bonn:MenuJS
From 2013.igem.org
(Difference between revisions)
(3 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<!-- JavaScript for our global menu --> | <!-- JavaScript for our global menu --> | ||
- | |||
<!-- #################################### --> | <!-- #################################### --> | ||
Line 157: | Line 156: | ||
wp7 = (function() { | wp7 = (function() { | ||
var style = document.documentElement.style; | var style = document.documentElement.style; | ||
- | + | if ('behavior' in style) | |
+ | if ('fill' in style) | ||
+ | if (/iemobile/i.test(navigator.userAgent)) | ||
+ | return true; | ||
+ | return false; | ||
})(), | })(), | ||
toggleMenuClasses = function($menu, o) { | toggleMenuClasses = function($menu, o) { | ||
Line 183: | Line 186: | ||
applyHandlers = function($menu,o) { | applyHandlers = function($menu,o) { | ||
var targets = 'li:has(' + o.popUpSelector + ')'; | var targets = 'li:has(' + o.popUpSelector + ')'; | ||
- | if ($.fn.hoverIntent | + | if ($.fn.hoverIntent) |
+ | if (!o.disableHI) { | ||
$menu.hoverIntent(over, out, targets); | $menu.hoverIntent(over, out, targets); | ||
} | } | ||
Line 207: | Line 211: | ||
$ul = $this.siblings(e.data.popUpSelector); | $ul = $this.siblings(e.data.popUpSelector); | ||
- | if ($ul.length > 0 | + | if ($ul.length > 0) |
+ | if ($ul.is(':hidden')) { | ||
$this.one('click.superfish', false); | $this.one('click.superfish', false); | ||
if (e.type === 'MSPointerDown') { | if (e.type === 'MSPointerDown') { |
Latest revision as of 08:01, 4 October 2013