How do you use a named function with event ui in jquery
<p>I have this function:</p>

<pre><code>$( ".timebox" ).draggable({    
     containment: "parent",
     axis: "x" ,
     drag: refactorTimebox(event, ui)
});
</code></pre>

<p>and I want to call the function <code>refactorTimebox(event, ui)</code>. How do I pass the <code>event</code> and <code>ui</code> variable to my function.</p>

<p>The line drag: <code>refactorTimebox(event, ui)</code> doesn't work.</p>

<p>This is the refactorTimebox function:</p>

<pre><code>function refactorTimebox(event, ui){
     console.log(ui.position);
}
</code></pre>
