Connor
Connor

Reputation: 4168

jQuery UI draggable and sortable not working like I want it to

HI all. You can see the code right here: http://jsbin.com/egixa5/5/edit. I'm trying to make it so when I drag an article, it only puts it between each article, not the elements inside each article. Also, I'm not sure why it's duplicating the content, instead of just dragging and dropping it…

Any ideas? I would really appreciate any help!

Upvotes: 0

Views: 409

Answers (1)

Matt Ball
Matt Ball

Reputation: 359776

I'm trying to make it so when I drag an article, it only puts it between each article, not the elements inside each article.

Change $("#main").find('article').sortable(...) to $("#main").sortable(...).

Also, I'm not sure why it's duplicating the content, instead of just dragging and dropping it…

That would be the helper: clone bit.


I think you basically just want to model your code after this demo.

Upvotes: 2

Related Questions