Download a file and scroll to bottom div on button click

Demo: 👉🏻 https://codepen.io/livehelp/pen/MWoNPqX?editors=1010

Just use an HTML or Code element in Elementor to paste in the code instead of a Button element.

<h2><a href="#smooth" onclick="window.open('https://downloads.wordpress.org/plugin/apk-downloader.zip')";>Click to Download + Smooth Scroll</a></h2>

<p>Insert enough text here to have a scoll bar.</p>

<div id="smooth"><h1>Tadaa! Jumps to this div based on the id #smooth onClick.<h1></div>

<script>
const links = document.querySelectorAll("a");

for (const link of links) {
  link.addEventListener("click", clickHandler);
}

function clickHandler(e) {
  e.preventDefault();
  const href = this.getAttribute("href");
  const offsetTop = document.querySelector(href).offsetTop;

  scroll({
    top: offsetTop,
    behavior: "smooth"
  });
}
</script>