Я пытаюсь использовать ajax. Тем не менее, консоль говорит, что $. ajax не определен? Эта проблема вызвана версией Boostraps, потому что я слышал, что они как-то включают Ajax.
Я пытался использовать несколько версий ajax для CDN, но ни одна из них не работала.
Код html, включающий все операции импорта:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Rackod</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Google fonts -->
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500,700&display=swap" rel="stylesheet">
<!-- style/css (components-stylesheet + local Dashboard stylesheet) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type='text/css' media='screen' href="./style.css">
<link rel='stylesheet' type='text/css' media='screen' href='../style/style.css'>
<!-- jQuery / AJAX -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="assets/jquery.min.js"></script>
</head>
<body data-spy="scroll" data-target=".site-nav">
<nav class="navbar sticky-top flex-md-nowrap p-0">
<a class="navbar-brand col-sm-3 col-md-2 mr-0" href="#">
<svg id="company-logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 552.19 194.56"><defs><style>.cls-1,.cls-9{fill:none;}.cls-2,.cls-3{fill:#15427f;}.cls-3{opacity:0;}.cls-4{fill:#5164ac;}.cls-5{fill:#007eaa;}.cls-6{opacity:0.5;fill:url(#Unnamed_Pattern);}.cls-7{fill:#1d4280;}.cls-8{fill:#005b92;}.cls-9{stroke:#5164ac;stroke-miterlimit:10;stroke-width:8px;}.cls-10{font-size:106.66px;fill:#ededed;font-family:SofiaProSoftBold, Sofia Pro Soft;}</style><pattern id="Unnamed_Pattern" data-name="Unnamed Pattern" width="17.01" height="8.5" patternUnits="userSpaceOnUse" viewBox="0 0 17.01 8.5"><rect class="cls-1" width="17.01" height="8.5"/><rect class="cls-2" width="8.5" height="8.5"/><rect class="cls-3" x="8.5" width="8.5" height="8.5"/></pattern></defs><title>logo</title><g id="Ebene_2" data-name="Ebene 2"><g id="logo"><path class="cls-4" d="M282.31,105.08l10.53,15.13c1.88,2.82.66,7.05-2.54,8.93a6.72,6.72,0,0,1-8.93-1.88L269,106.77h-6.3v16.92a6.69,6.69,0,0,1-6.86,6.39c-3.57,0-6.86-3-6.86-6.39V71.9c.09-3.86,2.44-7.05,6.58-7.05h19.83c14.47,0,21.34,10.34,21.52,20.86C296.6,94.17,291.9,102.26,282.31,105.08ZM262.67,77V95.21H275c5.36,0,8.18-4.89,8.18-9.12,0-4-2.63-9.12-7.8-9.12Z"/><path class="cls-4" d="M336.74,91.07c.09-3.19,3.1-5.83,6.58-5.83s6.58,2.54,6.58,5.83v33.18c0,3.29-3,5.83-6.58,5.83s-6.49-2.63-6.58-5.83v-.84a15.59,15.59,0,0,1-13.16,7.05c-11.18,0-21.34-8.28-21.34-22.84s10.16-22.75,21.34-22.75c2.82,0,9.4,1.22,13.16,7ZM326.12,118.8c5.92,0,10.71-5.26,10.71-11.09S332,96.62,326.12,96.62c-6.58,0-10.34,5.26-10.34,11.09S319.54,118.8,326.12,118.8Z"/><path class="cls-4" d="M382.9,117.77a13.53,13.53,0,0,0,6.48-1.7c2.35-1.31,6.2-1.88,8.55.47a6.44,6.44,0,0,1-.84,9.59,24.39,24.39,0,0,1-14.19,4.33c-12.6,0-24.07-8.84-24.07-22.66v-.28c0-13.82,11.47-22.65,24.07-22.65a24.38,24.38,0,0,1,14.19,4.32,6.44,6.44,0,0,1,.84,9.59c-2.35,2.35-6.2,1.79-8.55.47a13.64,13.64,0,0,0-6.48-1.69c-5.64,0-10.72,3.85-10.72,10v.28C372.18,113.91,377.26,117.77,382.9,117.77Z"/><path class="cls-4" d="M421.53,112.32v11.93c0,3.29-3,5.83-6.58,5.83s-6.48-2.63-6.58-5.83v-57c.1-3.2,3.1-5.83,6.58-5.83s6.58,2.54,6.58,5.83V97.84L431.78,87.5a6.24,6.24,0,0,1,8.46-.75,5.85,5.85,0,0,1,.84,8.36l-10.24,10,14.47,15.13c2.44,2.63,2.26,6.58-.38,8.55-2.35,2-6.76,1.7-8.64-.56Z"/><path class="cls-4" d="M451.52,107.52c0-13.82,10.24-22.65,23-22.65s23.13,8.83,23.13,22.65-10.34,22.94-23.13,22.94S451.52,121.34,451.52,107.52Zm33,0a9.92,9.92,0,1,0-19.83,0,9.92,9.92,0,1,0,19.83,0Z"/><path class="cls-4" d="M539,67.2c.09-3.2,3.1-5.83,6.58-5.83s6.58,2.54,6.58,5.83v57.05c0,3.29-3,5.83-6.58,5.83s-6.49-2.63-6.58-5.83v-.84a15.59,15.59,0,0,1-13.16,7.05c-11.19,0-21.34-8.28-21.34-22.84s10.15-22.75,21.34-22.75c2.82,0,9.4,1.22,13.16,7Zm-10.62,51.6c5.92,0,10.71-5.26,10.71-11.09s-4.79-11.09-10.71-11.09c-6.58,0-10.34,5.26-10.34,11.09S521.83,118.8,528.41,118.8Z"/><ellipse class="cls-5" cx="97.83" cy="107.02" rx="96.64" ry="86.01"/><ellipse class="cls-6" cx="97.83" cy="107.02" rx="96.64" ry="86.01"/><ellipse class="cls-7" cx="97.83" cy="90.01" rx="93.83" ry="86.01"/><ellipse class="cls-8" cx="97.83" cy="95.68" rx="93.83" ry="78.27"/><ellipse class="cls-9" cx="97.83" cy="90.01" rx="93.83" ry="86.01"/><text class="cls-10" transform="translate(68.36 129.74)">$</text></g></g></svg>
</a>
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap">
<a class="nav-link" href="#">Sign out</a>
</li>
</ul>
</nav>
<main>
<div class="container-fluid">
<div class="row">
<nav class="col-md-2 d-none d-md-block bg-light sidebar">
<div class="sidebar-sticky">
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link" href="index.html">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
Dashboard
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline></svg>
Docs
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-users"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
Account
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-bar-chart-2"><line x1="18" y1="20" x2="18" y2="10"></line><line x1="12" y1="20" x2="12" y2="4"></line><line x1="6" y1="20" x2="6" y2="14"></line></svg>
Predict
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="models.html">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-layers"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>
Models
</a>
</li>
</ul>
</div>
</nav>
<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4"><div class="chartjs-size-monitor" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;"><div class="chartjs-size-monitor-expand" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="chartjs-size-monitor-shrink" style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div></div>
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom">
<h1 class="h2">Models</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<button class="btn btn-sm btn-outline-secondary">Rackod +</button>
</div>
</div>
</div>
<div id="models">
<div id="flex-models" class="d-flex flex-wrap">
<div class="model model-new">
Add new model
<div class="icon-lg">
<i class="fas fa-plus-circle"></i>
</div>
</div>
<div class="model">
Test
<div class="icon-lg">
<i class="fas fa-plus-circle"></i>
</div>
</div>
<div class="model">
Add new model
<div class="icon-lg">
<i class="fas fa-plus-circle"></i>
</div>
</div>
<div class="model">
Add new model
<div class="icon-lg">
<i class="fas fa-plus-circle"></i>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
</main>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="../scripts/rackod.js"></script>
<script src="models_script.js"></script>
</body>
</html>
Ошибка консоли:
Uncaught TypeError: $.ajax is not a function
at HTMLDocument.<anonymous> (models_script.js:12)
at l (jquery-3.3.1.slim.min.js:2)
at c (jquery-3.3.1.slim.min.js:2)