shopping cart quick add
parent
d38886922f
commit
73b019e5c7
|
@ -23,10 +23,12 @@
|
|||
|
||||
<script>
|
||||
document.addEventListener('scroll', function() {
|
||||
var scrollButton = document.getElementsByTagName('scroll-to-cart-button')[0];
|
||||
var scrollButton = document.getElementsByClassName('scroll-to-cart-button')[0];
|
||||
|
||||
console.log("scrollButton", scrollButton)
|
||||
|
||||
if (scrollButton === undefined) return
|
||||
|
||||
if (window.scrollY > 300) { // Zeigt den Button an, wenn mehr als 300px gescrollt wird
|
||||
scrollButton.style.display = 'block';
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue