I am trying to set up a script that sets invisible everything with a specific class name. This is an example of what I am trying to name:
<script type="text/javascript"> function hideItems(){ document.getElementsByClassName('class1').style.visibility = "hidden"; } </script>
Class names refer to table sizes similar to this example:
<table onclick="hideItems()" width="200" border="1"> <tr> <td class="class1">1</td> <td class="class2">2</td> <td class="class3">3</td> <td class="class1">1</td> <td class="class2">2</td> <td class="class3">3</td> </tr> <tr> <td class="class3">3</td> <td class="class1">1</td> <td class="class2">2</td> <td class="class3">3</td> <td class="class1">1</td> <td class="class2">2</td> </tr> </table>
In the end, there will be three flags displaying sizes based on which of the three is selected. This part, I can do everything well, but to call on specific measurements to become invisible is what I have a problem with right now.
Thanks in advance for any help.
source share