You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
598 B
21 lines
598 B
const listedesentree = [];
|
|
|
|
function activationBoutonFlotant(lui) {
|
|
if (listedesentree.find(function(valeur) {return valeur == lui.name;})) {
|
|
for( var i = 0; i < listedesentree.length; i++){
|
|
if ( listedesentree[i] === lui.name) {
|
|
listedesentree.splice(i, 1);
|
|
break;
|
|
}
|
|
}
|
|
} else {
|
|
listedesentree.push(lui.name);
|
|
};
|
|
console.log(listedesentree);
|
|
if (listedesentree.length > 0){
|
|
document.getElementById("enregistement").classList.remove("deactivation");
|
|
}else{
|
|
document.getElementById("enregistement").classList.add("deactivation");
|
|
}
|
|
}
|