Team:NCTU Formosa/source/head
From 2014.igem.org
(Difference between revisions)
(8 intermediate revisions not shown) | |||
Line 77: | Line 77: | ||
}) | }) | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | if ($(document).scrollTop() > | + | if ($(document).scrollTop() > 140) { |
$('#toc').stop().css({ | $('#toc').stop().css({ | ||
position: 'fixed', | position: 'fixed', | ||
- | + | top: '10px', | |
- | + | left: '-265px' | |
+ | }); | ||
} | } | ||
var long = false, | var long = false, | ||
Line 95: | Line 96: | ||
$('#toc').stop().css({ | $('#toc').stop().css({ | ||
position: 'fixed', | position: 'fixed', | ||
- | left: ' | + | top: '0px', |
+ | left: '-265px' | ||
}).animate({'top': -22-$('#toc').height()+wheight+'px'}, 500); | }).animate({'top': -22-$('#toc').height()+wheight+'px'}, 500); | ||
}} | }} | ||
} else { | } else { | ||
away = false; | away = false; | ||
- | if ($(document).scrollTop() < | + | if ($(document).scrollTop() < 140){ |
$('#toc').stop().css({ | $('#toc').stop().css({ | ||
position: 'absolute', | position: 'absolute', | ||
- | left: '- | + | top: '0px', |
- | } | + | left: '-465px' |
+ | }); | ||
} | } | ||
else { | else { | ||
$('#toc').stop().css({ | $('#toc').stop().css({ | ||
position: 'fixed', | position: 'fixed', | ||
- | + | top: '10px', | |
- | + | left: '-265px' | |
+ | }); | ||
} | } | ||
} | } |
Latest revision as of 17:14, 15 September 2014