javascript passing function as parameter
<p>If I have this:</p>

<pre><code>$(SomeID).on({
    click: function () { SomeFunction1(); },
    mouseenter: function () { SomeFunction2(); },
    mouseleave:function () { SomeFunction3(); }
}, '.SomeClass');
</code></pre>

<p>I can rewrite it as </p>

<pre><code>$(SomeID).on({
    click: SomeFunction1,
    mouseenter: SomeFunction2,
    mouseleave: SomeFunction3
}, '.SomeClass');
</code></pre>

<p>But what if I need to pass some parameter like this:</p>

<pre><code>$(SomeID).on({
    click: function () { SomeFunction1($(this)); },
    mouseenter: function () { SomeFunction2($(this).index()); },
    mouseleave: function () { SomeFunction3($(this).index()); }
}, '.SomeClass');
</code></pre>

<p>Is there an alternative?</p>

<p>Thanks.</p>
