我有这样的功能:如何使用与事件的UI命名函数jQuery中
$(".timebox").draggable({
containment: "parent",
axis: "x" ,
drag: refactorTimebox(event, ui)
});
,我想调用的函数refactorTimebox(event, ui)
。如何将event
和ui
变量传递给我的函数。
行拖动:refactorTimebox(event, ui)
不起作用。
这是refactorTimebox功能:
function refactorTimebox(event, ui){
console.log(ui.position);
}