Team:NCTU Formosa/source/header-notebook
From 2014.igem.org
(Difference between revisions)
Line 120: | Line 120: | ||
function initMenu() { | function initMenu() { | ||
var block = $(".calendar-day"); | var block = $(".calendar-day"); | ||
- | var index | + | var index; |
block.hover(function(){window.status = $(this)}, function(){window.status = ""}); | block.hover(function(){window.status = $(this)}, function(){window.status = ""}); | ||
$('.note').hide(); | $('.note').hide(); | ||
Line 126: | Line 126: | ||
block.click( | block.click( | ||
function() { | function() { | ||
- | + | // index = block.index(this)+1; | |
- | + | index = $(this).closest('.calendar').find('.calendar-day').index(this); | |
- | + | ||
- | + | ||
$(this).closest('.cal-wrapper').find('.note:nth-child('+index+')').slideToggle('fast'); | $(this).closest('.cal-wrapper').find('.note:nth-child('+index+')').slideToggle('fast'); | ||
} | } |
Revision as of 18:49, 5 October 2014