I\'m using Bootstrap\'s JavaScript buttons to style some radio buttons, and I don\'t seem to be able to set an initial button as checked.
Here is my code:
If you're using the HTML 5 doctype, just use checked
without any value:
checked="checked" should work as well, so you'll have to clarify what's not working for you.
checked
attribute on the input
will ensure correct state on the form fieldactive
class on the label
will set the correct visual stateReference documentation.