Here's the problem/question:
Jquery buttons work (show up formatted in jquery style, as per the example in the jquery documentation) in the first example (venues) and don't work (don't show up formatted in jquery style) in the second (radio).
I've been trying to get jquery buttons working, but I can't seem to do it.
I've been working from this question and adapted the jfiddle
I'm sure it must be just a small thing I'm missing - but why does this code work:
<fieldset class="filter_form_fieldset venues">
<legend class="filter_form_fieldset_legend">Choose a venue type:</legend>
<input type="checkbox" name="venuetypes[]" id="venue-1" />
<label for="venue-1">Venue 1</label>
<input type="checkbox" name="venuetypes[]" id="venue-2" />
<label for="venue-2">Venue 2</label>
<input type="checkbox" name="venuetypes[]" id="venue-3" />
<label for="venue-3">Venue 3</label>
</fieldset>
and this code doesn't?
<tr>
<td class="goal_row">goal 1: </td>
<td id="radio">
<input id="score_1_1" name="score_1" type="radio" value="1" />
<label for="score_1">1</label>
<input id="score_1_2" name="score_1" type="radio" value="2" />
<label for="score_1">2</label>
<input id="score_1_3" name="score_1" type="radio" value="3" />
<label for="score_1">3</label>
<input id="score_1_4" name="score_1" type="radio" value="4" />
<label for="score_1">4</label>
<input id="score_1_5" name="score_1" type="radio" value="5" />
<label for="score_1">5</label>
</td>
</tr>
Put the radios in a div and change the for value from name to id like this
<tr>
<td class="goal_row">goal 1: </td>
<td>
<div id="radio">
<input id="score_1_1" name="score_1" type="radio" value="1" />
<label for="score_1_1">1</label>
<input id="score_1_2" name="score_1" type="radio" value="2" />
<label for="score_1_2">2</label>
<input id="score_1_3" name="score_1" type="radio" value="3" />
<label for="score_1_3">3</label>
<input id="score_1_4" name="score_1" type="radio" value="4" />
<label for="score_1_4">4</label>
<input id="score_1_5" name="score_1" type="radio" value="5" />
<label for="score_1_5">5</label>
</div>
</td>
</tr>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments