How to show closest button in jQuery without using the closest() method?
<p>I have a bunch of inputs and buttons, similar to how Facebook's news feed:</p>

<pre><code>&lt;div class="section_1"&gt;
    &lt;input name="input-name"/&gt;
    &lt;button style="display:none"&gt;Save&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>I have a bunch of these (section_2, section_3, etc.). I could put id's like this:</p>

<pre><code>&lt;div class="section_1"&gt;
    &lt;input class="expandableinput" name="input-name" sectionId="1" /&gt;
    &lt;button style="display:none" sectionId="1"&gt;Save&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>And show the button based on the section id (and this is just quick pseudo-code, forgive me if there's a mistake):</p>

<pre><code>$('expandableinput').click(function() {
  var thissectionId = $(this).attr('sectionId');
  $('button[sectionId=thissectionId]').show();
});
</code></pre>

<p>Is there a better/faster way of accomplishing this, without using closest()?</p>
