-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
30 lines (25 loc) · 745 Bytes
/
script.js
File metadata and controls
30 lines (25 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
FREEproject Website
The official website for FREEproject.
Contributors are shown at https://freeproject-oss.github.io/contributors.html
(C) FREEproject Open Source Systems and contributors 2018.
*/
$.fn.followTo = function (pos) {
var $this = this, $window = $(window);
$window.scroll(function(e) {
if ($window.scrollTop() > pos) {
$this.css({
position: "absolute",
top: $(window).height() + 60
});
} else {
$this.css({
position: "fixed",
top: $(window).height() - 130 - 40
});
}
});
};
window.onload = function() {
$("#coverCard").followTo($(window).height() - 580);
}