Optimized DOM Manipulation
This commit is contained in:
parent
7265165167
commit
cad76e3317
@ -143,9 +143,11 @@ $(function () {
|
|||||||
/* Permet d'afficher la liste des citations/proverbes */
|
/* Permet d'afficher la liste des citations/proverbes */
|
||||||
if(chemin === "/views/quote-list.php") {
|
if(chemin === "/views/quote-list.php") {
|
||||||
window.onload = $('.totalLengthQuote').html('Total de ' + quotes.length + ' citations.');
|
window.onload = $('.totalLengthQuote').html('Total de ' + quotes.length + ' citations.');
|
||||||
|
let resultat = "";
|
||||||
for (index in quotes) {
|
for (index in quotes) {
|
||||||
$( ".quote-list" ).append('<tr> <td class="quote-element-list important">' + quotes[index]["source"] + '</td> <td class="quote-element-list">" ' + quotes[index]["quote"] + ' "</td> </tr>');
|
resultat = resultat + `<tr> <td class="quote-element-list important">${quotes[index]["source"]}</td> <td class="quote-element-list">${quotes[index]["quote"]}</td> </tr>`;
|
||||||
}
|
}
|
||||||
|
$( ".quote-list" ).append(resultat);
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#submitConvertCurrency").click(function()
|
$("#submitConvertCurrency").click(function()
|
||||||
|
Reference in New Issue
Block a user