Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个 div。第一个 divAvailable items包含一些列表项,其中包含一个设置为 的输入字段,disabled可以将其拖到另一个Wanted itemsdiv 中。这很好用,但是一旦输入在想要的项目列表中,我就需要启用它,这样当我发布它时,它只会发布想要的项目,而不是所有内容。有任何想法吗?
Available items
disabled
Wanted items
receive您应该在所需项目列表的方法中指定一个函数。就像是:
receive
$("#wantedItems").sortable({ receive: function (event, ui) { //enable the input here } });