I have jQuery library in the footer to follow the good practices. It's placed right before the </body> tag. However, I have jQuery sortable code in the middle of the page inside a modal for some reason to sort photos. My sortable code was working this way few months back up to Oct, 2021. However, I did not look up on that part of module for some months and today it's not working. The console is returning this error:
Uncaught ReferenceError: $ is not defined
Example of my code:
<head>
  <title>My First page</title>
</head>
<body>
  <div class="sortPhotos">
    <ul id="sortable" class="reorder-gallery mt-3"></ul>
    <script>
      $(function() {
        $("#sortable").sortable({
          // CODE GOES HERE
        }).disableSelection();
      });
    </script>
  </div>
  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</body> 
     
     
    