title: return false not working on form submit in jquery
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function SaleProduct() {   
        var CusId=$('#CusId').val(); 
        $.get('customer-id.php?CusId='+CusId, function(data) {
           if(data==0){
       alert("Customer Id not valid.")
       return false;
     }
          });
       }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form action="sales-edit-insert.php" method="post" onSubmit="return SaleProduct()"&gt;
    &lt;input type="text" name="CusId" id="CusId"/&gt;
    &lt;!--Some input field here--&gt;
    &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>return false; or e.preventDefault(); not working on above function when I submit the form. Form is submitted after showing an alert. </p>