CODE
<div>
<p class="L _6">___</p>
<p class="L _5">_ _</p>
<p class="L _4">___</p>
<p class="L _3">_ _</p>
<p class="L _2">___</p>
<p class="L _1">_ _</p>
</div>
The content of every p with class "L" is always either "---" or "- -".
I'm trying to get my head around switching the visibility of the parent <div> by accessing the state of the second character in a child <p> tag, which will be "-" or " ", by using charAt(1).
First problem is how to access this character in each of a collection of <p> tags. Possibly something like:
var str="-";
get <p> elements by TagName;
collect all <p>s with certain class;
for these <p>s, if charAt(1) = str, hideparent()...
I can possibly write it, once I get the logic right. Any suggestions welcome.
