mirror of
https://github.com/offen/website.git
synced 2024-11-25 18:20:28 +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)
|
|
})
|
|
})()
|