cangoalie
Mar 14th 2008, 8:59 am
Hi
I need to hide/show multiple divs with the clicking of a link. Basically, I want to have one link that allows the user to view all divs, then four links that select only one of my four "types" of divs (Meetings, Tables, Events, Other). The problem with this that I cannot solve is this: on the page I am building I will have more than one div of each type - for example, maybe three Meetings, two Tables, four Events and one Other. This prohibits me from using a JavaScript method using getElementById, as ids have to be individual. I have googled the hell out of this question but don't have any answers. I also realize that I need to use a non-unique attribute like "class" rather than id but I don't know how to accomplish this. Any help you can offer would be greatly appreciated.
I need to hide/show multiple divs with the clicking of a link. Basically, I want to have one link that allows the user to view all divs, then four links that select only one of my four "types" of divs (Meetings, Tables, Events, Other). The problem with this that I cannot solve is this: on the page I am building I will have more than one div of each type - for example, maybe three Meetings, two Tables, four Events and one Other. This prohibits me from using a JavaScript method using getElementById, as ids have to be individual. I have googled the hell out of this question but don't have any answers. I also realize that I need to use a non-unique attribute like "class" rather than id but I don't know how to accomplish this. Any help you can offer would be greatly appreciated.