Skip to content Skip to sidebar Skip to footer

Radio Buttons With Font-awesome Icons Are Not Working

https://www.thezone.org/ride/insertride.asp On this page, the radio buttons have a font-awesome icon ring instead of the regular radio button circle. When you choose an option, the

Solution 1:

When your label is click nothing happens, the input isn't checked (clicked). Because you don't have a for attribute on your labels!

For attribute is used for linking a label to an input. So when you click on a label it 'simulates' a click on the input.

Example:

<input type="text" name="test"id="link_to_me">
<label for="link_to_me">Click me</label>

Here is a quote from specification:

This attribute explicitly associates the label being defined with another control. When present, the value of this attribute must be the same as the value of the id attribute of some other control in the same document. When absent, the label being defined is associated with the element's contents.

Specification | MDN

Post a Comment for "Radio Buttons With Font-awesome Icons Are Not Working"