Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

tigger javascript on page load / scroll to the bottom of the page when page loads

1. add a text area at the bottom of the page with a div placeholder to determine the target location:

html 

<div hidden id="bottom"></div>

2. add a javascript to that text area to run script. wait a bit for page to load. (dont mess with window.onload)

js

setTimeout(()=>{

   //your script goes here. Example that scrolls into #bottom:
   document.getElementById("bottom").scrollIntoView({
     behavior: 'smooth'
   })


},1000) //adjust accordingly in ms 

No comments: