mirror of
https://github.com/Unkn0wnCat/KevinK.dev.js.git
synced 2025-05-22 21:36:34 +02:00
Initialize project and port basics
This commit is contained in:
commit
ebb4f4d515
31 changed files with 20401 additions and 0 deletions
21
gatsby-browser.js
Normal file
21
gatsby-browser.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
let $ = require("jquery");
|
||||
|
||||
$(function() {
|
||||
$(window).on("scroll", function() {
|
||||
performUpdate();
|
||||
});
|
||||
|
||||
$(window).on("navigate", function() {
|
||||
performUpdate();
|
||||
});
|
||||
|
||||
window.setInterval(performUpdate, 500);
|
||||
});
|
||||
|
||||
function performUpdate() {
|
||||
if(window.scrollY < 15) {
|
||||
$(".topBar").addClass("homeBarTransparent");
|
||||
} else {
|
||||
$(".topBar").removeClass("homeBarTransparent");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue