title: stop a form submit (jQuery)
body: <p>I'm trying to stop a submit form with Javascript/jQuery, with a:</p>
  
  <pre><code>$('form#checkRepair').submit(function() {
      return false;
  });
  </code></pre>
  
  <hr>
  
  <p>this work in all browsers, but not in Internet Explorer  (version 8).
  In Internet Explorer version 9, works.</p>
  
  <p>does anyone know what the problem is?</p>
  
  <h2>I'm use a jQuery version 1.6.4.</h2>
  
  <pre><code>$('form#checkRepair').submit(function() {
      var nrObra = $('#nrObra').val();
      var nrDocCliente = $('#nrDocCliente').val();
  
      if((nrObra == '' || nrObra == 'Número de Reparação') 
          &amp;&amp; (nrDocCliente == '' || nrDocCliente  == 'Doc. Cliente')) {
          $('form#checkRepair .error').show();
          return false;
      }
  
      $('form#checkRepair .error').hide();
  
      var nrJoja = $('#nrLoja').val();
  
      $(this).hide();
      $('#loader').show();
  
      var url = "http://uri.com";
  
      $.get(url, function(data) {
          if(typeof data.error != 'undefined') {
              $('#status_repair_error div').html('&lt;h1&gt;Ocorreu um Erro&lt;/h1&gt;' + data.error);
              $('#status_repair_error').css('display', 'block');
              $('#status_repair').hide();
          } else {            
              $('#status_repair #repair-number span').text(data.repair.SAT_OBRANR);
              $('#status_repair #repair-state span').text(data.repair.situacao);
              $('#status_repair #repair-reason span').text(data.repair.motivo);
              $('#status_repair #product-name span').text(data.repair.produto);
              $('#status_repair #product-model span').text(data.repair.modelo);
              $('#status_repair #product-mark span').text(data.repair.marca);
              $('#status_repair #product-nrSerie span').text(data.repair.NSerieE);
              $('#status_repair #date-repair span').text(data.repair.dt_Pronta);
              $('#status_repair #date-lifting span').text(data.repair.dt_Entrega);
              $('#status_repair #client-name span').text(data.repair.cliente.nome);
  
              $("#status_repair li").each(function(index) {
                  var text = $(this).children("span").text();
                  if(text == '')
                      $(this).hide();
              });
  
              $('#nrObra').val('');
              $('#nrDocCliente').val('');
              $('#nrLoja').val('');
          }
  
          $.colorbox({
              inline:true, innerWidth:"960px", open: true, href: "#status_repair_container",
              onClosed:function(){ 
                  $('form#checkRepair').show();
                  $('#loader').hide();
                  $('#status_repair_error').hide();
                  $('#status_repair').show();
              }
          });
      }, 'jsonp');
      return false;
  });
  </code></pre>