Do not enter in submit() function

Keywords: javascript php jquery html


I'm trying to do a function that sends the form via AJAX, but does not enter the .submit function of the form. what am I doing wrong?

That's my function JQuery in file script.js

    console.log('doc'); // Enter here!
        console.log('submit'); // Not enter here!
        // var dados = jQuery( this ).serialize();
        // $.ajax({
        //     type: 'POST',
        //     url: '../client/clientRegisterEdit.php',
        //     data: dados,
        //     success: function(data){
        //         alert(data);
        //     }
        // });
        // return false;

That's my form HTML

    <form action="<?php //echo urlClientRegisterEdit ?> " method="post" id="formClient" name="formClient"  onsubmit="">
       <div class="row">
          <div class="col-12 col-sm-12 col-md-12 col-lg-12">
             <button type="submit" class="btn btn-success">
                <i class="fa fa-save"></i> Salvar
      <div class="row">
          <div class="col-12 col-sm-12 col-md-12 col-lg-3">
              <div class="form-group">
                 <label for="">Código:</label>
                 <input type="text" class="form-control" name="code" id="code" aria-describedby="helpId" placeholder="">
                 <!-- Others inputs here-->