简体   繁体   中英

Sortable and droppable knockout list

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.

Ryan Niemeyer has written great article about dragging and dropping with knockout:

\n

http://www.knockmeout.net/2011/05/dragging-dropping-and-sorting-with.html

Ryan Niemeyer has authored a Knockout plug-in for this purpose:

Here is an updated blog entry:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM