You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
<script>
|
|
|
|
function scroll() {
|
|
|
|
var element = document.getElementById('main-content');
|
|
|
|
var panel = document.querySelector(".panel");
|
|
|
|
var elementPosition = element.getBoundingClientRect().top;
|
|
|
|
var offsetPosition = elementPosition - panel.scrollHeight;
|
|
|
|
|
|
|
|
window.scrollTo({
|
|
|
|
top: offsetPosition,
|
|
|
|
behavior: "smooth"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<button type="button" class="button primary cool-button" style="margin-top: 1vh; border-radius: 4vw" on:click="{scroll}">
|
|
|
|
↓ Zjisti více
|
|
|
|
</button>
|