With this HTML (twig) :
<li class="ipsFieldRow">
<ul id="customSortable">
{% for plugin in plugins %}
<li id="{{plugin.name ~ '-sort'}}">{{plugin.name}}</li>
{% endfor %}
</ul>
<script>
//Put Here Works Fine
$("#customSortable").sortable();
$("#customSortable").disableSelection();
//Put in a document ready causes the '$(...).sortable is not a function' error.
$(document).ready(function() {
$("#customSortable").sortable();
$("#customSortable").disableSelection();
});
</script>
<li
The problem is described through the two comments in the code. Simply put, .sortable works perfectly when simply inlined into the HTML yet in any jquery callback, it results in the sortable is not a function error. The main reason why this is an issue for me is I want to call sortable('toArray') in a button click callback for server interaction.
As seen through the image, the common issue of the includes being in the wrong order is not the issue here.