jQuery multiple callbacks to one callback counting calls
<p><strong>I need just one callback at the and of multiple callbacks. With a simple "class"  MultiCallback that count the calls it seems to be solved. 
But the fadeIn function of jQuery calls mCallback just once.</strong></p>

<p>It have to call mCallback 3 times. That happens by using a callback function directly inside top scope.</p>

<p>Tested my MultiCallback class also on my own functions without any problems. I know
there a other ways like <a href="http://stackoverflow.com/questions/7378349/hide-multiple-elements-with-jquery-and-get-one-callback">Hide multiple elements with jQuery and get one callback</a>...
Just wanna know what is wrong with my logic.</p>

<pre><code>&lt;div id="1" style="display: none; background-color: green;"&gt;&lt;/div&gt;
&lt;div id="2" style="display: none; background-color: red;"&gt;&lt;/div&gt;
&lt;div id="3" style="display: none; background-color: blue;"&gt;&lt;/div&gt;

&lt;script&gt;

    var allElements = "#1, #2, #3";
    var multiCallback = new MultiCallback( $(allElements).length, function()
            {
                console.log("NEVER ENTER CALLBACK");
            });
    $(allElements).fadeIn(400, multiCallback.mCallback());

    function MultiCallback(limit, fn)
    {
        var finishedCalls = 0;

        function mCallback()
        {
            // Just enter one time !
            if (++finishedCalls == limit)
            {
                fn();
            }
        }

        return {
            mCallback : mCallback
        }
    }

&lt;/script&gt;
</code></pre>
