Wednesday, October 29, 2008

[jQuery] Re: text after a radio button

I had the same problem just now.

Try this:
<input name="joe" type="radio" value="1" id="val1" /><span
id="val1txt">1</span>
<input name="joe" type="radio" value="2" id="val2" /><span
id="val2txt">2</span>
...

Then when you want to hide/show both the radio button and the text:
$('#val1').show();
$("#val1txt").show();

$('#val2').hide();
$("#val2txt").hide();


Ed

On Oct 28, 9:01 pm, "amazz...@gmail.com" <amazz...@gmail.com> wrote:
> Working with  Lotus Notes developer - apparently, when building a form
> with radio buttons elements, Lotus automatically puts the value in
> text beside the button. He says there is no way to override this. So
> we get:
>
> <input name="joe" type="radio" value="1" />1
> <input name="joe" type="radio" value="2" />2
> <input name="joe" type="radio" value="3" />3
> <input name="joe" type="radio" value="4" />4
> <input name="joe" type="radio" value="5" />5
>
> I said maybe we can hide that text with jQuery, but I find that I can
> target anything in the input tag, but I can't seem to get the text
> after it. Any help appreciated.

No comments: