Select class nearest clicked button
<p>I want to expand the nearest div with the class "divtoexpand" when clicking button1.</p>

<p>How can I achieve this?</p>

<p>HTML:</p>

<pre><code>&lt;div class="test"&gt;
    &lt;div class="menu"&gt;
        &lt;div class="button1"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="divtoexpand"&gt;&lt;/div&gt;

&lt;div class="test"&gt;
    &lt;div class="menu"&gt;
        &lt;div class="button1"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="divtoexpand"&gt;&lt;/div&gt;
</code></pre>
