Never mind. Once again I figured out the problem.
On Sep 1, 3:08 pm, the intern <[email protected]> wrote:
> Hey all
>
> What I am working on is a form that has a bunch of yes or no
> questions. So I am using radio buttons for the yes or no. If a user
> clicks the yes radio, there will be additional questions that appear
> below for them to answer. If the user then clicks the no radio, the
> additional questions will hide again.
>
> I have the jQuery working just fine to show and hide the additional
> questions. Where my problem is, when the user clicks either of the
> radio buttons, the jQuery fires, but the radio button does not show as
> being clicked. What do I need to do so that radio button shows
> selected?
>
> Here is my jQuery code:
>
> $(document).ready(function(){
> $('[id$=_questions],[id$=_questionsLink]').hide();
> $('[id$=_y]').live('click',function(){
> var thiis = $(this).attr('id').charAt(1);
> $('#'+thiis+'_questions').show();
> $('#'+thiis+'_questionsLink').show();
> return false;
> });
> $('[id$=_n]').live('click',function(){
> var thiis = $(this).attr('id').charAt(1);
> $('[id$=_condition]').val("");
> $('[id$=_date]').find('option:first').attr
> ('selected','selected').parent('select');
> $('#'+thiis+'_questions').hide();
> $('#'+thiis+'_questionsLink').hide();
> return false;
> });
> $('[id$=toggle]').live('click',function(){
> var thiis = $(this).attr('id').charAt(0);
> $('#'+thiis+'_questions').toggle();
> $(this).text($(this).text() == 'hide additional questions' ? 'show
> additional questions' : 'hide additional questions');
> return false;
> });
>
> });
>
> Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---