Help Targeting element
<p>I have the following code:</p>

<pre><code>$(".main").click(function() {
    $(this).toggleClass("classA").toggleClass("classB");
    $(".secondary").toggleClass("classC").toggleClass("classD");
));

$(".secondary").click(function() {
    $(".secondary").toggleClass("classC").toggleClass("classD");
));
</code></pre>

<p>And HTML:</p>

<pre><code>&lt;div class="main"&gt;&lt;/div&gt;

&lt;div&gt;
    &lt;div class="secondary"&gt;&lt;/div&gt;
    &lt;table class="tbl"&gt;&lt;/table&gt;
&lt;/div&gt;

&lt;div&gt;
    &lt;div class="secondary"&gt;&lt;/div&gt;
    &lt;table class="tbl"&gt;&lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p>Currently it allows me to toggle class when each "secondary" element is clicked individually or change for all secondary when "main" is clicked. I need to add show/hide table in appropriate div when corresponding "secondary" or "main" is clicked. Having difficulty targetting. Tried but failed:</p>

<pre><code>$(this).closest(".tbl").toggle();
</code></pre>
