You can select the “selected” buttons in the jquery ui set of sets using checkboxes (to enable multitasking) with:
$('#format').buttonset(); $('#format').click(function() { var text = ""; $('#format').find('label[aria-pressed|="true"]').each(function() { text += $(this).attr("for") + "-"; }); $('#selected').html(text); });
This works fine in Chrome, IE, Safari, but this flag is not taken into account in Firefox. You can check this in jsFiddle .
source share