Opened 15 years ago
Closed 15 years ago
#2927 closed enhancement (worksforme)
Droppable accept option - allow a function
Reported by: | pfm102 | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | ui | Version: | 1.2.5 |
Keywords: | droppable | Cc: | [email protected]… |
Blocked by: | Blocking: |
Description
It would be great if the "accept" option to droppable could accept a function instead of a jQuery selector.
That function should have the event and UI arguments (same as drop option).
I want to be able to write quite complex logic for knowing whether the droppable should accept the draggable. For example, when re-ordering a list (where droppables are list-items with a class of "gap", interspersed with the content list-items), I would like to allow ul.gap to accept my draggable, UNLESS the gap is an immediate sibling of where the draggable started.
Change History (2)
comment:1 Changed 15 years ago by
Component: | core → ui |
---|---|
Keywords: | droppable added |
Owner: | set to paul |
comment:2 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The accept option already supports functions. The function takes one parameter which is the draggable element.