JSFiddle - React, Tailwind, and code Playground
by josekerekes
HTML
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<input type="button" value="0" />
JavaScript
$('input').click(function() {
var $t = $(this), btnVal = $t.val() == 0 ? 1 : 0;
$t.val(btnVal).toggleClass('descending')
})