[RESOLVED] problem using class selector
Hi,
First a description of what I am trying to do. I hope I am clear enough to be understood, but I'm not sure it is necessary to understand my intent. It is provided as background mostly.
I am writing a program that progressively goes through a tree of application states using radio buttons in forms. So, there is a root form with radio buttons and depending on the selection, the next form will be a form with radio buttons with the choices based on the context of the parent form. The idea is to move from the root form to a leaf node form depending on the user's selections. As the user progresses through tree, the next form is displayed below the n-th level form, so that all the current 'n+1' selection forms are displayed.
If the user decides to change one of the prior selections, then all the subforms below the form where the user makes the change should be hidden enabling the user to start making choices in that form and start working toward another leaf node.
Ok, now the problem.
I have implement an example of what I am trying to do. My problem is I can hide the forms as desired when an 'id' selection, e.g. $("#form_1_1").hide(), is made. But if I try to use a class selection, e.g. $(".1_1"), where the form has an attribute, class="1_1", then $(".1_1").hide(), the forms do not get hidden.
I have spent hours looking at this, experimenting, and reading, but I am clueless at this point. My feeling is that I am missing something obvious, but I am just not sure. More eyes on the problem will be greatly appreciated.
I have attached two files, "radio.txt" (originally radio.html, but html files cannot be attached) and "sel.txt" (originally sel.js but *.js files cannot be attached either). Note that radio.html includes a script tag that includes sel.js into the file. Note, also, that the only commented lines in sel.txt are lines that work properly when not commented out. The class selector .hide() method calls after the commented lines are the calls that are not working.
Jim A.