johnny / johnny/jquery-sortable

Ajax loaded content failed to trigger the sorting

Open
#199 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1.5k
Forks
429
PR merge metrics
No merged PRs in 30d

Description

Hi there I love this plugin and it works pretty amazingly. However while I was loading the entire content via ajax and then try to do sort it did does not work. Is there anything I am missing or its a limitation of the plugin ?
Here is my sample code

```


// the following sortable content is loaded via ajax

  1. ...


// ends here

```

And then I had

``` javascript
$(document).ready(function() {
var my_plugin_group = $("ol.serialization-sort-view").sortable({
group: 'serialization-detail-view',
delay: 100,
onDrop: function ($item, container, _super) {
var data = my_plugin_group.sortable("serialize").get();
var jsonString = JSON.stringify(data, null, ' ');
_super($item, container);
$.ajax({
type: "POST",
// post the jsonString for server-side sorting
success: function(html) {
// do something
}
});
}
});
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.