diff --git a/app/templates/index.html b/app/templates/index.html index 5fd4783..a3ee0d5 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -8,10 +8,10 @@ $('#expandForm').submit(function(event) { event.preventDefault(); // Prevent default form submission var userUrl = $('#urlInput').val(); // Get user input - $('#expandBtn').attr('disabled', true); // Disable button + $('#expandBtn').hide(); // Disable button $('#spinner').show(); // Show spinner $('#expandedUrl').empty(); // Clear previous result - $('#screenshot').empty(); + $('#screenshot').hide().empty(); $.ajax({ type: 'POST', url: '/', // Flask route for URL expansion @@ -22,11 +22,11 @@ // Append the image to the div with id "screenshot" $('#screenshot').append( $('').attr('src', 'screenshot.png') - ); + ).show(); }, complete: function() { $('#spinner').hide(); // Hide spinner - $('#expandBtn').attr('disabled', false); // Enable button + $('#expandBtn').show(); // Enable button } }); }); @@ -36,6 +36,11 @@ #spinner { display: none; } + #screenshot + { + display: none; + border: 1px solid black; + }
@@ -48,6 +53,6 @@{{url}}
- +