OzoneAsai commited on
Commit
7f03210
·
verified ·
1 Parent(s): 737784d

Create script.js

Browse files
Files changed (1) hide show
  1. static/script.js +15 -0
static/script.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.getElementById('prevBtn').addEventListener('click', function() {
2
+ navigate(prevUrl);
3
+ });
4
+
5
+ document.getElementById('nextBtn').addEventListener('click', function() {
6
+ navigate(nextUrl);
7
+ });
8
+
9
+ function navigate(url) {
10
+ const flashcard = document.getElementById('flashcard');
11
+ flashcard.classList.add('fade-out');
12
+ setTimeout(function() {
13
+ window.location.href = url;
14
+ }, 500); // Match this duration with the CSS animation duration
15
+ }