how to perform a function in the end other script?
<p>I need to hide <strong>div id="FormStep"</strong> when will be check last input.</p>

<p><em><strong>On my page I use this HTML code:</em></strong></p>

<pre><code>&lt;div id="FormStep"&gt;
  &lt;input type="text" name="test1" id="test1" class="validate" /&gt;
  &lt;div id="Checktest1Input"&gt;&lt;/div&gt;
  &lt;input type="text" name="test2" id="test2" class="validate" /&gt;
  &lt;div id="Checktest2Input"&gt;&lt;/div&gt;
  &lt;input type="text" name="test3" id="test3" class="validate" /&gt;
  &lt;div id="Checktest3Input"&gt;&lt;/div&gt;
&lt;input type="button" id="Step" value="Send"/&gt;
&lt;/div&gt;
</code></pre>

<p><em><strong>For validation on the page I use this JS code:</em></strong></p>

<pre><code>$('#Step').on('click',function(){
    $('.validate').each(function(){

        if ($(this).val().length == 0){
        $('#Check'+this.id+'Input').html('false');
          return false;
        } else {
        $('#Check'+this.id+'Input').html('true');
        }

      });
});
</code></pre>

<p><strong>Tell me please how I can add code <code>$('#Step').hide();</code> that this code <code>$('#Step').hide();</code> perform after check last input?</strong></p>
