jQuery - toggle() a form when a button is clicked in a list <p>Problem: I don't want it to toggle when I am clicking on the table. Only when I click the button(div). Also, there has to be a selector so that other li's tables doesnt toggle.</p> <p>jQuery</p> <pre><code>$(document).ready(function() { $('table.edititem').hide(); $('.menu-category &gt; li ul li .button').click(function(){ $('table.edititem', this).toggle(); }); }); </code></pre> <p>I know the problem is: $('table.edititem', >>>this&lt;&lt;&lt;).toggle(); Because the table is not inside the ".button". We need to grab the parent, but how do we do it?</p> <p>HTML</p> <pre><code>&lt;ul&gt; &lt;li&gt; Category1 &lt;ul&gt; &lt;li&gt; &lt;div&gt; &lt;div class="button"&gt;&lt;/div&gt; &lt;table class="edititem"&gt; &lt;/table&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I hope you understand what I mean.</p>