Team:Imperial College/Templates/Banner

From 2013.igem.org

(Difference between revisions)
m
m
Line 2: Line 2:
  <head>
  <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
 
+
  $('#cssmenu ul ul li:odd').addClass('odd');
 +
  $('#cssmenu ul ul li:even').addClass('even');
 +
  $('#cssmenu > ul > li > a').click(function() {
 +
$('#cssmenu li').removeClass('active');
 +
$(this).closest('li').addClass('active');
 +
 +
var checkElement = $(this).next();
 +
if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
 +
return false;
 +
}
 +
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
 +
$('#cssmenu ul ul:visible').slideUp('normal');
 +
checkElement.slideDown('normal');
 +
return false;
 +
}
 +
  });
   <link href="/menu_assets/styles.css" rel="stylesheet" type="text/css">
   <link href="/menu_assets/styles.css" rel="stylesheet" type="text/css">

Revision as of 17:46, 10 August 2013

$('#cssmenu ul ul li:odd').addClass('odd'); $('#cssmenu ul ul li:even').addClass('even'); $('#cssmenu > ul > li > a').click(function() { $('#cssmenu li').removeClass('active'); $(this).closest('li').addClass('active'); var checkElement = $(this).next(); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#cssmenu ul ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } });