generated from nathanwoodburn/python-webserver-template
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
|
||||
// Create table header
|
||||
const headerRow = document.createElement('tr');
|
||||
['Name', 'Amount', 'Value'].forEach((headerText, index) => {
|
||||
['Name', 'Amount', 'USD Value'].forEach((headerText, index) => {
|
||||
const th = document.createElement('th');
|
||||
th.textContent = headerText;
|
||||
th.style.border = '1px solid #ccc';
|
||||
@@ -142,7 +142,7 @@
|
||||
th.style.backgroundColor = '#333';
|
||||
th.style.color = 'white';
|
||||
|
||||
if (headerText === 'Value') {
|
||||
if (headerText === 'USD Value') {
|
||||
th.style.cursor = 'pointer'; // Make it clear this header is clickable
|
||||
th.addEventListener('click', () => sortTableByValue(tbody));
|
||||
}
|
||||
@@ -318,6 +318,10 @@ function sortTableByValue(tbody) {
|
||||
<td>Cardano</td>
|
||||
<td>stake1uy4qd785pcds7ph2jue2lrhhxa698c5959375lqdv3yphcgwc8qna</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sui</td>
|
||||
<td>0x7e4fa1592e4fad084789f9fe1a4d7631a2e6477b658e777ae95351681bcbe8da</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user