Skip to content

Instantly share code, notes, and snippets.

@atleastimtrying
Last active December 14, 2015 04:38
Show Gist options
  • Save atleastimtrying/5029065 to your computer and use it in GitHub Desktop.
Save atleastimtrying/5029065 to your computer and use it in GitHub Desktop.
*{
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;}
<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>
$(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