admin管理员组文章数量:1391937
I have a list that needs to be draggable. For simplicity lets have the items only be "boy" and "girl". I have another list "friends" that you can drag "boy" and "girl" into then set properties such as name, age, height, etc. This list also needs to be sortable (drag and drop).
Basically I want to add items to the "friends" list by dragging in either a "boy" or "girl" but I'm not sure how to get the two lists to interact using knockout.
I have a list that needs to be draggable. For simplicity lets have the items only be "boy" and "girl". I have another list "friends" that you can drag "boy" and "girl" into then set properties such as name, age, height, etc. This list also needs to be sortable (drag and drop).
Basically I want to add items to the "friends" list by dragging in either a "boy" or "girl" but I'm not sure how to get the two lists to interact using knockout.
Share Improve this question edited Sep 5, 2012 at 13:47 Nal 2,77121 silver badges14 bronze badges asked Sep 5, 2012 at 2:40 user1630508user1630508 952 silver badges8 bronze badges 2-
Sortable
connectWith
option? Or are you asking how to use knockout? – Nal Commented Sep 5, 2012 at 3:18 - I had it 90% there using pure jQuery but realized I needed knockout too because observables were not being created. Using the two together is stumping me. – user1630508 Commented Sep 5, 2012 at 13:13
1 Answer
Reset to default 8Ryan Niemeyer has written great article about dragging and dropping with knockout:
http://www.knockmeout/2011/05/dragging-dropping-and-sorting-with.html
Ryan Niemeyer has authored a Knockout plug-in for this purpose:
- https://github./rniemeyer/knockout-sortable
Here is an updated blog entry:
- http://www.knockmeout/2012/02/revisiting-dragging-dropping-and.html
本文标签: javascriptSortable and droppable knockout listStack Overflow
版权声明:本文标题:javascript - Sortable and droppable knockout list - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744689286a2619892.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论