|
Hi, |
Answered by
Flyer53
Jul 30, 2021
Replies: 1 comment 4 replies
|
Hi there Sure, for the page load you could use window.addEventListener('load', (event) => {
console.log('page is fully loaded');
jsPanel.create();
});To add a 5 sec delay just wrap the function creating the panel in a setTimeout like window.addEventListener('load', (event) => {
console.log('page is fully loaded');
window.setTimeout(function(){
jsPanel.create();
}, 5000);
});Take a look at: For scrolling it's basically the same. Look at: |
4 replies
Answer selected by
4goodapp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there
Sure, for the page load you could use
To add a 5 sec delay just wrap the function creating the panel in a setTimeout like
Take a look at:
https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
For scrolling it's basically the same. Look at:
https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event
https://develope…