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…
开发者_JAVA百科Any ideas? I would really appreciate any help!
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.
精彩评论