diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-06 23:54:49 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-03-06 23:54:49 +0100 |
commit | ca1a6aa7df6703c10d1cd97afedd9c6838ba425b (patch) | |
tree | ca8a7fbd6fd4d43268a095ead32f7b4fecd38b72 /script | |
parent | e2f172624be2c0cc96461bdd9418e23e798a93b2 (diff) |
First commit of the ousia based website architecture
Diffstat (limited to 'script')
-rw-r--r-- | script/ousia.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/script/ousia.js b/script/ousia.js new file mode 100644 index 0000000..0ef203a --- /dev/null +++ b/script/ousia.js @@ -0,0 +1,22 @@ +// @license magnet:?xt=urn:btih:5305d91886084f776adcf57509a648432709a7c7&dn=x11.txt +/* + * Ousía Website JS + * + * (c) Andreas Stöckel, 2015 + * + * This work is licensed under the X11 (MIT) license. + * http://www.opensource.org/licenses/mit-license.php + */ +(function () { + "use strict"; + var header = document.querySelector("header"); + window.addEventListener("scroll", function () { + if (window.pageYOffset > 40) { + header.className = "scrolled"; + } else { + header.className = ""; + } + }); +})(); +// @license-end + |