LE TAQUIN FONCTIONNE !!!!
This commit is contained in:
parent
42a7326d48
commit
7b1bd3b081
@ -16,11 +16,14 @@ function selection(event) {
|
|||||||
var maCase = event.currentTarget;
|
var maCase = event.currentTarget;
|
||||||
var vide = document.body.querySelector(".case.vide");
|
var vide = document.body.querySelector(".case.vide");
|
||||||
|
|
||||||
if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft == 102)) ||
|
if ((maCase.offsetTop == vide.offsetTop && Math.abs(maCase.offsetLeft - vide.offsetLeft) == 102) ||
|
||||||
(maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop == 102))) {
|
(maCase.offsetLeft == vide.offsetLeft && Math.abs(maCase.offsetTop - vide.offsetTop) == 102)) {
|
||||||
console.log("1");
|
console.log("ok");
|
||||||
maCase.className = "case vide";
|
maCase.className = "case vide";
|
||||||
|
var buff = maCase.innerHTML;
|
||||||
|
maCase.innerHTML = "";
|
||||||
vide.className = "case";
|
vide.className = "case";
|
||||||
|
vide.innerHTML = buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(event.currentTarget.className + " : " + event.currentTarget.innerText);
|
console.log(event.currentTarget.className + " : " + event.currentTarget.innerText);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user