Last active
August 16, 2019 13:26
-
-
Save robertsheacole/9055ded419d75a642b473173dcae0395 to your computer and use it in GitHub Desktop.
Russian Flag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="flag"> | |
<div class="stripe white"></div> | |
<div class="stripe blue"></div> | |
<div class="stripe red"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('.happy').addEventListener('pointerdown', (event) => { | |
// Compare previous event's ID that was cached | |
// to current event's ID and handle accordingly | |
console.log(event.pointerId) | |
}, false); | |
document.querySelector('.sad').addEventListener('pointerdown', (event) => { | |
// Compare previous event's ID that was cached | |
// to current event's ID and handle accordingly | |
console.log(event.pointerId) | |
}, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.flag { | |
width: 400px; | |
border: 1px solid grey; | |
} | |
.stripe { | |
width: 400px; | |
height: 70px; | |
} | |
.blue { | |
background-color: blue; | |
} | |
.red { | |
background-color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment