I am using a jQuery UI button widget in a form that I need to check for some radio / checkbox elements.
According to the demo in the provided link -
Their (source elements) associated label is like a button, while the main input is updated by click.
if you check even the page with examples on which I pointed out that the main elements of the buttons are not updated with anything. Note - The middle switch in this example is set by default.
I use the following code to detect button states - oddly enough, this is always true (it appears that this will be a lie).
$el = $("#someCheckbox"); if($el.attr('checked')){ //do stuff }
It looks like I can get the button state from the jquery ui shortcut as the button style (a la class="ui-state-active) , but I would like to avoid reading labels and stick to checking the correct switches.
Am I looking for form data incorrectly by accessing the original switch?
OR
Is this a potential bug in jquery ui butotn widget?
javascript jquery jquery-ui jquery-ui-button
Derek adair
source share