Last active
December 14, 2015 04:38
-
-
Save atleastimtrying/5029065 to your computer and use it in GitHub Desktop.
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
*{ | |
margin:0; | |
padding:0; | |
} | |
.race-conditions{ | |
color:white; | |
font-weight:bold; | |
} | |
.race-conditions button{ | |
padding:8px; | |
} | |
.ready {background-color: red;} | |
.steady {background-color:orange;} | |
.go {background-color:green;} |
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='race-conditions'> | |
<button class='ready' data-message='Ready'>Ready</button> | |
<button class='steady' data-message='Steady'>Steady</button> | |
<button class='go' data-message='Go'>Go</button> | |
</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
$(function(){ | |
$('.container button').click(function(){ | |
alert($(this).data('message')); | |
$(this).addClass('disabled'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment