Optimized DOM Manipulation

This commit is contained in:
Divlo 2019-10-04 23:53:26 +02:00
parent 7265165167
commit cad76e3317

View File

@ -143,9 +143,11 @@ $(function () {
/* Permet d'afficher la liste des citations/proverbes */
if(chemin === "/views/quote-list.php") {
window.onload = $('.totalLengthQuote').html('Total de ' + quotes.length + ' citations.');
let resultat = "";
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()