radio_buttons with jquery

dax

EDIT:

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> 
reggaemahn

FIDDLE

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Toggling Radio Buttons with jQuery

From Dev

jquery radio buttons conflict

From Dev

Adding radio buttons with jquery

From Dev

jQuery For loop with radio buttons

From Dev

JQuery - check if all radio buttons are "No"

From Dev

jquery event listener for radio buttons

From Dev

jquery validation rules for radio buttons

From Dev

FlatUI - radio buttons jQuery compatibility

From Dev

jQuery: Radio buttons not getting checked

From Dev

Jquery-Dynamic Radio Buttons

From Dev

jQuery - Radio Buttons - Variables - OnClick

From Dev

How to validate radio buttons in jquery?

From Dev

JQuery Filtering with Radio Buttons in FullCalendar

From Dev

Click event on radio buttons jquery

From Dev

changing the Style of Radio buttons in jQuery mobile 1.4.0

From Dev

Add JQuery functionality to dynamically created radio buttons

From Dev

Bootstrap radio buttons - adding variables with jquery

From Dev

jQuery .val() doesn't work for radio buttons

From Dev

jQuery How to auto sync groups of radio buttons

From Dev

Use jquery validate() to with radio buttons and javascript variables

From Dev

Unselecting and Selecting jQuery radio buttons on change

From Dev

jquery get value of group of radio buttons

From Dev

jQuery Validate Plugin not working on radio buttons

From Dev

Detecting change in dynamically generated radio buttons with jQuery

From Dev

jQuery radio buttons with toggle/remove class mystery

From Dev

Quiz with radio buttons using PHP and jQuery

From Dev

How to filter elements in jQuery using radio buttons

From Dev

Jquery - Iterate through all checked radio buttons

From Dev

jQuery check value of multiple radio buttons

Related Related

HotTag

Archive