Added ids to crypto addresses and saved them as variables in JavaScript

This commit is contained in:
2025-07-25 09:22:58 -04:00
parent 073889f1a7
commit d29f7d1529
2 changed files with 14 additions and 3 deletions

11
app.js
View File

@@ -1,3 +1,6 @@
//
// Smooth scrolling when opening and closing the details element for value block
//
// Set expanded value block to a variable
const valueBlock = document.getElementById("value-expanded");
const bodyTop = document.getElementById("top");
@@ -12,3 +15,11 @@ document.querySelector('.value-block').addEventListener('toggle', function() {
bodyTop.scrollIntoView({ behavior: "smooth" });
}
});
//
// Copy crypto wallet addresses to clipboard when clicked
//
const btcadd = document.getElementById("btcwall").textContent;;
const ethadd = document.getElementById("ethwall").textContent;;
const dogeadd = document.getElementById("dogewall").textContent;;