-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,4 @@ <h2>The most precious pieces of the collection.</h2> | |
<h1><a href="mailto:[email protected],[email protected]">Contact us if you are interested in</a></h1> | ||
</div> | ||
</body> | ||
<!-- Late-loaded JavaScript --> | ||
<script src="script/include-html.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,4 @@ <h1><a href="index.html"> DORIC STYLE</a></h1> | |
<h1><a href="mailto:[email protected],[email protected]">Contact us if you are interested in</a></h1> | ||
</div> | ||
</body> | ||
<!-- Late-loaded JavaScript --> | ||
<script src="script/include-html.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,4 @@ <h1><a href="mailto:[email protected],marchese.mattia@liceolioy. | |
|
||
</div> | ||
</body> | ||
<!-- Late-loaded JavaScript --> | ||
<script src="script/include-html.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function swapItems() { // Funzione che porta in cima l'ultimo elemento della tabella | ||
table_rows = document.getElementsByTagName("tr"); // table_rows è l'elenco dei tag <tr> | ||
table_rows[1].before(table_rows[table_rows.length - 1]); // Posiziona l'ultimo elemento di table_rows subito sopra il primo | ||
} | ||
// La variabile document si riferisce a tutto il DOM (Document Object Model) | ||
button = document.getElementsByTagName("th")[0]; // button è il primo <th> della pagina, che corrisponde alla scritta "Social Media" | ||
button.addEventListener("click", swapItems); // Aggiunge un listener (ascoltatore) per l'evento "click" relativo all'oggetto button | ||
// In pratica chiama la funzione di callback che si chiama swapItems quando l'elemento button viene "click"ato |