Rammohan0504 commited on
Commit
5ead48c
·
verified ·
1 Parent(s): e254cb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -123,10 +123,10 @@ with gr.Blocks() as demo:
123
  document.getElementById('popup-description').textContent = description;
124
  document.getElementById('popup-price').textContent = price;
125
 
126
- // Adjust position based on scroll
127
  const scrollY = window.scrollY;
128
- popup.style.top = `${{scrollY + 200}}px`; // Dynamically position 200px below the scroll position
129
- popup.style.display = 'block'; // Show the popup
130
  }}
131
 
132
  function closePopup() {{
 
123
  document.getElementById('popup-description').textContent = description;
124
  document.getElementById('popup-price').textContent = price;
125
 
126
+ // Dynamically position based on scroll position
127
  const scrollY = window.scrollY;
128
+ popup.style.top = `${{scrollY + 200}}px`; // Adjust to show 200px below current scroll
129
+ popup.style.display = 'block'; // Make the popup visible
130
  }}
131
 
132
  function closePopup() {{