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:
<div style="float: left;"> <span class="caption" style="width: 255px; display: block;"> Assigned Limits </span> <div class="assigned-limit-box"> <ul id="limAssigned" class="ul-base"> </ul> </div> </div>
This is my js:
$('#limAssigned').sortable();
My jQuery js is loaded before my jQuery UI js.
What am I doing wrong?
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.