Shuffle decks on click
This commit is contained in:
parent
345a86bfa6
commit
dd94513736
@ -15,6 +15,12 @@ window.addEventListener('load', () => {
|
||||
deckName = document.querySelector('#card-container').getAttribute("data-deckName");
|
||||
xhr.open("GET", "/deck/" + deckName + "/deck.json");
|
||||
xhr.send();
|
||||
|
||||
document.querySelectorAll('.card-pile').forEach(e => {
|
||||
e.addEventListener('click', event => {
|
||||
shuffle(piles[event.target.getAttribute('data-pile')]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
let cardInteract = interact('.card')
|
||||
|
Loading…
Reference in New Issue
Block a user