Semantic UI Radio Buttons do not check when clicking the label

Douglas Gaskell picture Douglas Gaskell · Jan 10, 2016 · Viewed 9.5k times · Source

As the title says, the radio buttons do not check when the label (tex) is clicked. However this seems to work fine on Semantic's site.

Semantic UI Documentation with working radio buttons: http://semantic-ui.com/modules/checkbox.html

The following example code is straight from the Semantic UI Documentation above:

How can I fix this?

Edit: Apparently I need some javascript for the radio buttons as is mentioned here: http://semantic-ui.com/modules/checkbox.html#/usage. I'm having trouble finding the minimum required code for a working radio button/checkbox though.

Answer

Douglas Gaskell picture Douglas Gaskell · Jan 10, 2016

I needed $('.ui.checkbox').checkbox(); in my Javascript.