Uncaught TypeError: $ .ajax is not a function at HTMLDocument.initial

0

When I start this error appears

  

Uncaught TypeError: $ .ajax is not a function at HTMLDocument.initialize

$(document).ready(iniciar)

function iniciar(){
$.ajax({
        type:"POST",
        url:"../modelos/sucursales.php",
        success:function(datos){
            $(".sucursal").html(datos);
        }
    });
}
    
asked by JUAN CAMILO RUIZ RAMIREZ 22.01.2018 в 00:51
source

1 answer

0

The error is because you are sure you are using version slim of JQuery, you must go to CDN and use another option compressed or not, less slim , since you have limited options within the code one of them, Ajax

V3.

<script
 src="https://code.jquery.com/jquery-3.3.1.js"
 integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
 crossorigin="anonymous"></script>

V2.

<script
  src="https://code.jquery.com/jquery-2.2.4.min.js"
  integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
  crossorigin="anonymous"></script>
    
answered by 22.01.2018 в 00:59