hi, I am working on something like this
I have about 20 groups, each group contains two paragraphs, one
visible and one hidden; and two divs, one visible and one hidden.
Each group have a unique id from mysql.
What I am trying to do:
          When you click on a paragraph, all divs and paragraphs with
the unique id of the clicked paragraph, are being toggled.
I have the code to get the id:
                var divs = document.getElementsByTagName("p");
                var len = divs.length;
                var thisDiv;
                var thisDivID;
                for (var i = 0; i < len; i++)
                {
                        thisDiv = divs[i];
                        if (thisDiv.className == 'adminhead')
                        {
                                thisDivID = thisDiv.id;
                        }
                }
But I don't know how to use the variable in jquery things like:
               $("#rightcol .text #" +thisDivID+ " ").toggle("slow");
Now sorry for my no profesional words and for my english, I am a
begginer in both things :D

Reply via email to