stuff idk
This commit is contained in:
@ -6,13 +6,13 @@ function setBackground() {
|
||||
}
|
||||
function loadPJS() {
|
||||
let div = document.createElement("div");
|
||||
div.id = "particles-js";
|
||||
div.id = "pjs";
|
||||
document.body.appendChild(div);
|
||||
let script = document.createElement("script");
|
||||
script.src = "https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js";
|
||||
document.head.appendChild(script);
|
||||
script.addEventListener("load", ()=>{
|
||||
particlesJS.load('particles-js', "/js/particlesjs-config.json", ()=>{});
|
||||
particlesJS.load('pjs', "/js/particlesjs-config.json", ()=>{});
|
||||
});
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ document.addEventListener("DOMContentLoaded", ()=>{
|
||||
})
|
||||
|
||||
document.addEventListener("scroll", ()=>{
|
||||
document.getElementById("particles-js").style.top = window.scrollY + "px";
|
||||
document.getElementById("pjs").style.top = window.scrollY + "px";
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user