Question: I don't know if it is suppoused to do this, but I guess it is...

I thought at first that it may be something wrong with my whole script and I managed to make new file on localhost and test just `fadeOut();` function.

Apparently it returned function twice again so I went to jsfiddle to check what will happen there. And same thing happened. In this case `console.log();` returned twice.

* *What I did and what I am trying to do ?*

Well I want to return specified function, or in fiddle sample, specified `console.log();` only once. However I am fadingOut multiple elements (two, to be exact).

Is there any way to do that, instead of duplicating each element to fadeOut at the same time ?

**Sample that will return console.log(); twice.**

```
setTimeout(function () {

    $( ".one, .two" ).fadeOut(300, function () {
        console.log("Return Function!");
    });

}, 2000);

```

**Sample that will return console.log(); once.**

```
setTimeout(function () {

    $( ".one" ).fadeOut(300);

    $( ".two" ).fadeOut(300, function () {
        console.log("Return Function!");
    });

}, 2000);

```

**Fiddle Preview:**
[Fiddle Redirect](http://jsfiddle.net/dvLden/ApUYq/1/)

Answer: 
There are two elements in the collection, so `fadeOut` is called twice, so yes, it's supposed to do that.

You can have the callback fire only once regardless of the number of elements in the collection by using the returned promise from the animation and `$.when` and `$.then`

```
setTimeout(function () {

    $.when( $( ".one, .two" ).fadeOut(300) ).then(function () {
        console.log("Return Function!");
    });

}, 2000);

```

[**FIDDLE**](http://jsfiddle.net/ApUYq/2/)
I checked this out of curiosity and my console shows two different javascript declarations:

```
Return Function! fiddle.jshell.net/dvLden/ApUYq/show/:38
Return Function! fiddle.jshell.net:38

```

Apparently fiddle runs this twice.
if you browse to <http://fiddle.jshell.net/dvLden/ApUYq/show/:38> you'll get only one "Return Function" in your console.