I would like to style all of the radio buttons with the same name in a form easily in a nice Prototype or jQuery-style shortcut.
$('billship').select('name:shipType')
or something like that.
Does such a shortcut for form field names exist?
I would like to style all of the radio buttons with the same name in a form easily in a nice Prototype or jQuery-style shortcut.
$('billship').select('name:shipType')
or something like that.
Does such a shortcut for form field names exist?
With jQuery:
$('#billship input:radio[name="shipType"]');
$('input:radio[name="shipType"]', '#billship');
Both are equivalent, but the 2nd one performs slightly better and I personally prefer it.
With Prototype, I believe it would look like this:
$$('#billship input[type="radio"][name="shipType"]');