JSFiddle - React, Tailwind, and code Playground

by Serge

HTML

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>

<div data-role="page">
    <div data-role="content">
        <input id="button" type="button" value="+" /> 
        <input id="button2" type="button" value="-" /> 
    </div>
</div>

JavaScript

var count = 1;
$("#button").on('click', function () {
    $(this).val(count++).button("refresh");
});
$("#button2").on('click', function () {
if (count>-1)
$("#button").val(count--).button("refresh");
});