Tengo un error al enviar datos por ajax me marca un error en la función $.ajax()
pero ya revise la documentación y el código esta bien.
Este error me marca
status.js:29 Uncaught TypeError: $.ajax is not a function
at HTMLFormElement. (status.js:29)
at HTMLFormElement.dispatch (jquery-3.2.1.js:3)
at HTMLFormElement.q.handle (jquery-3.2.1.js:3)
$('#formularioAgregar').submit(function(event) {
event.preventDefault();
var frm= $( this ).serialize();
console.log(frm);
$.ajax({
method: "POST",
url: "some.php",
data: frm
})
.done(function( msg ) {
alert( "Data Saved: " + msg );
});
});
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
</head>
<body>
<button type="button" id="nuevo-producto" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-whatever="@mdo">AGREGAR</button>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Registra un Status</h3>
</div>
<div class="modal-body">
<form id="formularioAgregar" method="post">
<div class="form-group">
<label for="recipient-name" class="form-control-label">STATUS:</label>
<input type="text" required="required" name="status" id="status" maxlength="100"/>
</div>
<div class="modal-footer">
<button type="submit" name="enviar" id="agregar" class="btn btn-primary">Agregar</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="bootstrap/jquery-3.2.1.js"></script>
<script src="bootstrap/cloudflare.js"></script>
<script src="bootstrap/js/bootstrap.min.js" crossorigin="anonymous"></script>
<script src="js/status.js"></script>
</body>
</html>