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 -->
-
<script type="text/javascript" src="http://igem13.uni-bonn.de/shared/superfish/js/jquery-1.9.1.min.js"></script>
 
<!-- #################################### -->
<!-- #################################### -->
Line 157: 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 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 && !o.disableHI) {
+
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 && $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