dynamic jquery question
<p>I am doing the following to toggle the display of an element:</p>

<pre><code>$("*[id^=" + id + "_]").toggle(); // id is the element to toggle
</code></pre>

<p>This then toggles everything of the form id_* where * is any string.</p>

<p>I now realized, that I don't want to simply toggle each element, but show or hide it based on the state of the clicked element.  How can I conditionally show() or hide() all those elements of the form 'id_*' depending on some other boolean?  My problem is that the selector automatically selects multple id's, so how I can I trigger a show() or hide() selectively on <em>each</em> id that is selected?</p>
