1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| "use strict";
const Etape_1 = ["Souris Grise", "Moskito", "Arakne", "Boufton Blanc", "Boufton Noir"];
for (let i = 0, lg = Etape_1.length; i < lg; i++)
{
let check = $("<i class='fas fa-camera'></i>");
let del = $("<i class='fas fa-trash-alt'></i>");
let Monstre = $("<div class='Monstre'></div>");
Monstre.text(Etape_1[i]);
Monstre.append(del, check);
$(".Researched").append(Monstre);
}
$(".Researched, .Caught").on("click", ".fa-camera", function(){
var p = $(this).parent();
p.fadeOut(function(){
$(".Caught").append(p);
p.fadeIn();
});
$(this).remove();
});
$(".Researched, .Caught").on("click", ".fa-trash-alt", function(){
var p = $(this).parent();
p.fadeOut(function(){
p.remove();
});
}); |