Even though I\'ve followed the directions in the jQuery UI documentation, I\'m getting the error that .sortable is not a function.
Here is my code:
jQuery UI and jQuery must be loaded in a certain order:
<script src="jquery.js">...
<script src="jquery-ui.js">...
Make sure you are including jQuery UI after jQuery.
I had the same issue when a page using the sortable() function was required by a main php page. Adding the following code within the head of the main page wasn't sufficient. Adding it also at the beginning of the required page (inside the body in my case) fixed everything.
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
I figured it out. The page that I needed sortable for is loaded into a div within my main page. I had to add the jQuery UI script to that jsp rather than the main page jsp. Funny how that worked out.
I got this error by having more than 1 version of jQuery on the page. Credit goes to IonicBurger: jQuery sortable is not a function
it worked for me with this specific version of Jquery
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
but it doesn't work for newer versions