Re: [WSG] Show Hide by Class

2005-09-21 Thread Alan Trick
Yes, I've been doing that for some time and I really find it cleans up my code, however you should note that class names are usually space separated. At least in CSS the class "green tomatoes" will get the styles of "green" and "tomatoes", so by making your javascript aware of this you can hav mult

RE: [WSG] Show Hide by Class

2005-09-20 Thread Mike Foskett
g.uk -Original Message- From: Stuart Sherwood [mailto:[EMAIL PROTECTED] Sent: 20 September 2005 01:30 To: wsg@webstandardsgroup.org Subject: Re: [WSG] Show Hide by Class I'm using this at the top

Re: [WSG] Show Hide by Class

2005-09-19 Thread Stuart Sherwood
I'm using this at the top of my js file to initially hide the topics: if (document.getElementById) { // Content available if javascript disabled document.write('href="hide.css" />'); } I'm not sure if screen readers will read the related css. Anyone know? Someone else also suggested I add an

Re: [WSG] Show Hide by Class

2005-09-19 Thread Dmitry Baranovskiy
Hi Stuart, I think it would be much easier if your JavaScript will change only id of the categories container. Example: CSS: .topiclist { <<>> } #toggled .topiclist { display: none; } HTML: ... and JavaScript: function toggleIt() { var Div = document

Re: [WSG] Show Hide by Class

2005-09-19 Thread Paul Novitski
At 10:57 PM 9/18/2005, Stuart Sherwood wrote: ... For each category, the list of topics must be hidden until clicked. ... //Populate the array with all the page tags var allPageTags=document.getElementsByTagName("*"); //Cycle through the tags using a for loop for (i=0; i ... But there are prob

[WSG] Show Hide by Class

2005-09-18 Thread Stuart Sherwood
Hi All. I hope someone can help me with my problem but it isn't exactly on topic so replies off list are encouraged. The markup below is far from semantic but necessary for floating elements and alignment. It will come out of a publishing system and may repeat any number of times. For each cat