[jQuery] Can't grab text element
I have a web page that renders radio buttons with text after it. I
want to take that text and wrap a label tag around it but I can't grab
the text.
Here is the HTML:
<input type="radio" name="RadioField" type="hidden" value="Y">Yes
<input type="radio" name="RadioField" type="hidden" value="N">No
I can get the radio object and I can get an array the radio objects
siblings using ("#radio").each( function(){ $(this).siblings ).
I can't get the first sibling that's a text node. I've tried $
(this).siblings("[nodeType=3]") but I don't get anything returned.
I've also tried to loop through the siblings and see what the node
type is but the return value is always "undefined".