dimanche 27 décembre 2015

Add a checkbox inside a JQuery draggable element

I am working on an webpage that assigns summer campers to activities. The display page shows each activity as a JQuery draggable target, and campers are displayed as draggable items. The camp staff can run the algorithm, and then correct it by dragging a camper from one activity to another. So far, so good.

The wrinkle here is that I'd like a way for camp staff to mark certain camper assignments as "permanent", so that when the algorithm runs again, those campers are not moved from their choices. So for example, if camper A is assigned to Swimming, and that is ideal for her, I want a way for the camp staff to signal that. I was thinking the ideal thing would be a checkbox inside the camper display boxes: if the staff checks the box, then the algorithm will not change that assignment.

Is there a way to put a checkbox inside a Draggable element? I saw this posting about checkboxes:

Checking a checkbox with jQuery?

But it did not say if it was possible to put a checkbox inside a Draggable. Can this be done?

Thanks in advance for any help here.




Aucun commentaire:

Enregistrer un commentaire