title: Return false; does not work in jquery .each function
body: <p>Before posting this question I tried StackOverflow but did not find the answer.</p>
  
  <p>So, the question is, I have an array with some values(suppose 4,6,7,8,10 etc). I used the .each function of jquery to prompt the alert message. but my code gives me an alert message, focus to the desired input box and submit the form and does not "return false". 
  I want it to return false after focusing. </p>
  
  <pre><code>$(document).on('keypress','#create_invoice',function(){
  $.each(newArr, function( i, l ){
  //alert( "Index #" + i + ": " + l );
  if($.trim($('#item_name'+l).val()).length == 0)
          {
            alert("Please Enter Item Name");
            $('#item_name'+l).focus();
           // return false; //if use this not work and submit form
          }
  //return false; //if use this not work and submit form
  });
  //return false; if i use this then submit() not work
  $('#invoice_form').submit();
  });
  </code></pre>