The HTML markup for a wijradio widget looks like this.
Markup |
Copy Code |
---|---|
<input type="radio" name="myOption" id="Opt1" value="1" /><label for="Opt1">One</label> <input type="radio" name="myOption" id="Opt2" value="2" /><label for="Opt2">Two</label> <input type="radio" name="myOption" id="Opt3" value="3" /><label for="Opt3">Three</label> |
You can initialize the widget with the following jQuery script.
Script |
Copy Code |
---|---|
<script id="script1" type="text/javascript"> $(document).ready(function () { $(":input[type='radio']").wijradio(); }); </script> |
The markup and script featured here results in the following live widget. Click a radio button to select it.
There are several alternative ways to use markup to create a wijradio widget.
Sample Markup |
Copy Code |
---|---|
<input type='radio'> |
or
Sample Markup |
Copy Code |
---|---|
<input type='radio' id='radio1' /><label for='radio1'></label> |
or
Sample Markup |
Copy Code |
---|---|
<label><input type='radio' /></label> |