JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css">
<div class='my-checkbox'>
    <input type='checkbox' id='check0' /><label for='check0'>A</label>
    <input type='checkbox' id='check1' /><label for='check1'>B</label>
    <input type='checkbox' id='check2' /><label for='check2'>C</label>
</div>
<div id='texthere'>Watch this space...</div>

JavaScript

var $checkbox = $("div.my-checkbox");
$checkbox.buttonset();
$checkbox.click(function () {
    var text = "";
    $(this).children('label.ui-state-active').each(function () {
        text += $(this).text() + ",";
    });
    $("#texthere").html(text); // to demonstrate the issue.
});