first commit
This commit is contained in:
14
index.js
Normal file
14
index.js
Normal file
@ -0,0 +1,14 @@
|
||||
function loadPJS() {
|
||||
let div = document.createElement("div");
|
||||
div.id = "particles-js";
|
||||
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', "particlesjs-config.json", ()=>{});
|
||||
});
|
||||
}
|
||||
document.addEventListener("DOMContentLoaded", ()=>{
|
||||
loadPJS();
|
||||
})
|
Reference in New Issue
Block a user