mirror of
https://github.com/offen/website.git
synced 2024-12-27 06:50:22 +01:00
11 lines
292 B
JavaScript
11 lines
292 B
JavaScript
;(function () {
|
|
var icon = document.querySelector('body.index .icon')
|
|
if (!icon) {
|
|
return
|
|
}
|
|
window.addEventListener('scroll', function () {
|
|
var scrollTop = parseInt(window.document.documentElement.scrollTop, 10)
|
|
icon.style.opacity = Math.min(scrollTop / 100, 1)
|
|
})
|
|
})()
|