Hallo Forum
Ich möchte einen Back to Button mit jquary einbinden.
habe hierbei im Netz etwas gestöbert und bin auf eine gute Lösung gestossen.
Mit dem responsiv Design Elara auf Xampp funzt der Cod perfekt.
Auf dem Host-Server im CMS Syquando bekomme ich den Felher 503 beim Versuch zu speichern.
HTML Cod in Starseite / Eigenschaften / Html eingebunden
habe dan den teil Script in die Datei jquar.js eingebunden, das hat das Promlem nicht gelöst
Für Eure Hilfe danke ich im Voraus
grüsse
Marco
Hier den der Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<!DOCTYPE html> <html> <head> <style> #myBtn { display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; border: none; outline: none; background-color: red; color: white; cursor: pointer; padding: 15px; border-radius: 10px; } #myBtn:hover { background-color: #555; } </style> </head> <body> <button onclick="topFunction()" id="myBtn" title="Go to top">Top</button> <script> // When the user scrolls down 20px from the top of the document, show the button window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("myBtn").style.display = "block"; } else { document.getElementById("myBtn").style.display = "none"; } } // When the user clicks on the button, scroll to the top of the document function topFunction() { document.body.scrollTop = 0; document.documentElement.scrollTop = 0; } </script> </body> </html>