mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Fix scroll to top
This commit is contained in:
parent
5343d1b06e
commit
b1509c3f6a
@ -15,7 +15,7 @@ function scrollToTop(scrollToElementSelector, triggerElementSelector) {
|
|||||||
scrolltoTopTrigger.onclick = () => {
|
scrolltoTopTrigger.onclick = () => {
|
||||||
scrollToThis.scrollIntoView({
|
scrollToThis.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
block: 'end',
|
block: 'start',
|
||||||
inline: 'nearest'
|
inline: 'nearest'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -339,7 +339,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
client.query(results.data.query);
|
client.query(results.data.query);
|
||||||
});
|
});
|
||||||
// Enable scroll to Top functionality.
|
// Enable scroll to Top functionality.
|
||||||
scrollToTop('#headline', '#menu-scroll-to-top-div');
|
scrollToTop('header', '#menu-scroll-to-top-div');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user