Using sortable-jquery-binding.js requires to have Sortable in global namespace. This is because it does not require sortable as a dependency. Otherwise, having the requirejs config as in the following snippet will not work. I also cannot get it to work via shim config.
requirejs.config({
paths: {
// ...
'jquery.sortable': 'sortable-jquery-binding',
'sortable': 'sortable-1.4.2.min',
}
})
as this will cause an Uncaught ReferenceError: Sortable is not defined in l38 of the binding when using the sortable constructor.
The only possible way for me is to require both libraries and making Sortable global as in #8 before making the jquery call which is not the way it is supposed to work:
require(['sortable', 'jquery', 'jquery.sortable'], function (Sortable, $){
window.Sortable = Sortable;
$('#myContainer').sortable();
});
Any hints on this?
Using sortable-jquery-binding.js requires to have Sortable in global namespace. This is because it does not require sortable as a dependency. Otherwise, having the requirejs config as in the following snippet will not work. I also cannot get it to work via shim config.
as this will cause an
Uncaught ReferenceError: Sortable is not definedin l38 of the binding when using the sortable constructor.The only possible way for me is to require both libraries and making Sortable global as in #8 before making the jquery call which is not the way it is supposed to work:
Any hints on this?