Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
chore: another attemp
Browse files
app.py
CHANGED
@@ -538,16 +538,25 @@ CSS = """
|
|
538 |
"""
|
539 |
back_to_top_btn_html = '''
|
540 |
|
541 |
-
<
|
542 |
-
<
|
|
|
|
|
|
|
|
|
543 |
|
544 |
<script>
|
545 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
546 |
</script>
|
547 |
|
548 |
-
<button id="toTopBtn" onclick="window.parent.postMessage('scrollToTop', '*')">
|
549 |
-
<a style="color:white; text-decoration:none;">Back to Top!</a>
|
550 |
-
</button>
|
551 |
'''
|
552 |
|
553 |
if __name__ == "__main__":
|
|
|
538 |
"""
|
539 |
back_to_top_btn_html = '''
|
540 |
|
541 |
+
<button onclick="scrollToTop()">Scroll to Top</button>
|
542 |
+
<button onclick="scrollToBottom()">Scroll to Bottom</button>
|
543 |
+
|
544 |
+
<div id="content">
|
545 |
+
<!-- Content goes here -->
|
546 |
+
</div>
|
547 |
|
548 |
<script>
|
549 |
+
function scrollToTop() {
|
550 |
+
const element = document.getElementById("content");
|
551 |
+
element.scrollIntoView(true);
|
552 |
+
}
|
553 |
+
|
554 |
+
function scrollToBottom() {
|
555 |
+
const element = document.getElementById("content");
|
556 |
+
element.scrollIntoView(false);
|
557 |
+
}
|
558 |
</script>
|
559 |
|
|
|
|
|
|
|
560 |
'''
|
561 |
|
562 |
if __name__ == "__main__":
|