Vote up and down script using bootstrap

Bootstrap 3 vote up and down script using jquery

Vote up and down script using bootstrap

<div class="row">
        <div class="col-sm-3 col-md-3 col-lg-3">
            <div class="input-group">
                <span class="input-group-btn">
                    <button type="button" id="increaseButton" class="btn btn-success">+</button>
                </span>
                <input type="text" class="form-control" id="vote" placeholder="Vote" /> 
                <span class="input-group-btn">
                    <button type="button" id="decreaseButton" class="btn btn-danger">-</button>
                </span>
            </div>
        </div>
</div>
$("#vote").val('0');

// Create a click handler for your increment button
$("#increaseButton").click(function () {
    var newValue = 1 + parseInt($("#vote").val());
    $("#vote").val(newValue);
});
// .. and your decrement button
$("#decreaseButton").click(function () {
    var newValue = parseInt($("#vote").val()) - 1;
    $("#vote").val(newValue);
});
DEMO
Vote up and down script using bootstrap Vote up and down script using bootstrap Reviewed by Bhaumik Patel on 8:35 AM Rating: 5