Template:Team:Bonn:MenuJS

From 2013.igem.org

(Difference between revisions)
 
(2 intermediate revisions not shown)
Line 156: Line 156:
wp7 = (function() {
wp7 = (function() {
var style = document.documentElement.style;
var style = document.documentElement.style;
-
return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent));
+
                                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 182: 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 && !o.disableHI) {
+
if ($.fn.hoverIntent)
 +
                                  if (!o.disableHI) {
$menu.hoverIntent(over, out, targets);
$menu.hoverIntent(over, out, targets);
}
}
Line 206: Line 211:
$ul = $this.siblings(e.data.popUpSelector);
$ul = $this.siblings(e.data.popUpSelector);
-
if ($ul.length > 0 && $ul.is(':hidden')) {
+
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