Team:NCTU Formosa/source/head
From 2013.igem.org
(Difference between revisions)
Line 82: | Line 82: | ||
var $this = this, | var $this = this, | ||
$window = $(window), | $window = $(window), | ||
- | $tocf = | + | $tocf = 0; |
$window.scroll(function (e) { | $window.scroll(function (e) { | ||
if ($window.scrollTop() < pos) { | if ($window.scrollTop() < pos) { | ||
Line 89: | Line 89: | ||
top: '0px' | top: '0px' | ||
}); | }); | ||
- | $tocf = | + | $tocf = 0; |
} else { | } else { | ||
$this.css({ | $this.css({ | ||
Line 95: | Line 95: | ||
top: '78px' | top: '78px' | ||
}); | }); | ||
- | $tocf = | + | $tocf = 1; |
} | } | ||
}); | }); | ||
Line 105: | Line 105: | ||
$(document).scroll(function() { | $(document).scroll(function() { | ||
- | if ($(document).scrollTop() > 800) { | + | if ($(document).scrollTop() > 800 && $tocf>0) { |
if (!away) { | if (!away) { | ||
away = true; | away = true; |
Revision as of 19:24, 15 September 2013