Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly appended elements do not become draggable/sortable #23

Open
Phaet opened this issue Sep 9, 2022 · 2 comments
Open

Newly appended elements do not become draggable/sortable #23

Phaet opened this issue Sep 9, 2022 · 2 comments

Comments

@Phaet
Copy link

Phaet commented Sep 9, 2022

I want to create a list of items dynamically by means of $( "#list").append(item). I noticed, though, that the items do not become sortable.
I also tried to apply $("#list").sortable() after the list creation has been completed, but this does not work either.
Is there something like .sortable('refresh') similar to what JQuery UI provides?

@Phaet
Copy link
Author

Phaet commented Sep 10, 2022

Found the answer myself: I tried to sort items. But sortable items need to be container elements. Embedding each img in li does the trick.

@gardiner
Copy link
Owner

Great, thanks for your feedback :) Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants