kcelia commited on
Commit
014dfbe
1 Parent(s): 14091f6

chore: another attemp

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -542,14 +542,13 @@ back_to_top_btn_html = """
542
  </button>
543
 
544
  <script>
545
- window.addEventListener('message', function(event) {
546
- if (event.data === 'scrollToTop') {
547
- var iframe = document.getElementById('your-iframe-id'); // replace with your iframe's id
548
- iframe.scrollIntoView(true);
549
  }
550
- });
551
  </script>
552
 
 
553
  """
554
 
555
  if __name__ == "__main__":
 
542
  </button>
543
 
544
  <script>
545
+ function scrollToTop() {
546
+ var element = document.getElementById('toTopBtn');
547
+ element.scrollIntoView({ behavior: 'smooth', block: 'start' });
 
548
  }
 
549
  </script>
550
 
551
+
552
  """
553
 
554
  if __name__ == "__main__":