Alle producten
<button onclick="topFunction()" id="back-to-top" title="Terug naar boven">Terug naar boven</button>
<style>
#back-to-top {
display: none;
position: fixed;
bottom: 120px;
right: 40px;
z-index: 99;
border: none;
outline: none;
background-color: #57b04d;
color: white;
cursor: pointer;
padding: 15px;
border-radius: 10px;
font-size: 18px;
}
#back-to-top:hover {
background-color: #d3d3d3;
}
@media only screen and (max-width: 768px) {
.product-image-container {
width: 100%;
margin: 0;
}
}
</style>
<script>
//Get the button:
topButton = document.getElementById("back-to-top");
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 400 || document.documentElement.scrollTop > 400) {
topButton.style.display = "block";
} else {
topButton.style.display = "none";
}
}
function topFunction() {
window.scrollTo({
top: 0,
behavior: "smooth"
});
}
</script>