在http://jqueryui.com/demos/sortable/#placeholder提供的示例中,当您拖动任何一个项时,占位符是出现的橙色框。
使用
要做到这一点,我需要更改什么(例如在sortable.js中)?
使用
placeholder
选项可以调整此元素,但它只能像此处描述的那样修改元素的类:http://jqueryui.com/demos/sortable/#options
我想更多地自定义此元素,例如通过向placeholder
选项提供函数,以与向helper
选项提供函数的方式相同。要做到这一点,我需要更改什么(例如在sortable.js中)?
container.refreshPositions();
,这样就可以解决所有问题。哇哦! - kamranicusreturn $('<tr><td colspan="999"></td></tr>')[0];
来解决问题。 - Hannareturn $('<tr><td colspan="' + currentItem.children('td').length + '"> </td></tr>')[0];
- Roy Shoaupdate
函数是否必要或者可以省略? - Joshua Pinter