Template:Team:HokkaidoU Japan/script
From 2011.igem.org
(Difference between revisions)
Line 537: | Line 537: | ||
}); | }); | ||
- | $(function(){ | + | $(function(){ |
var $toc = $('#toc'); | var $toc = $('#toc'); | ||
var $tab = $('<div>').addClass('toc-tab'); | var $tab = $('<div>').addClass('toc-tab'); | ||
var $close = $('<div>').addClass('close'); | var $close = $('<div>').addClass('close'); | ||
- | $ | + | var $wrapper = $('<div>').addClass('toc-wrapper'); |
$toc.before($tab); | $toc.before($tab); | ||
- | $toc.hide(); | + | $toc.wrap($wrapper); |
+ | $toc.before($close) | ||
+ | $wrapper = $('.toc-wrapper'); | ||
+ | $wrapper.hide(); | ||
$tab.bind('click', function(){ | $tab.bind('click', function(){ | ||
$tab.hide(); | $tab.hide(); | ||
- | $ | + | $wrapper.fadeIn('normal'); |
$close.bind('click', function(){ | $close.bind('click', function(){ | ||
- | $ | + | $wrapper.fadeOut('normal'); |
$tab.show(); | $tab.show(); | ||
}); | }); |
Revision as of 11:08, 5 October 2011