Question: How do I get the index of clicked item in the code below?

```
$('selector').click(function (event) {
    // get index in collection of the clicked item ...
});

```

With Firebug I saw this: `jQuery151017197709735298827: 2` (I've clicked in the second element).

Answer: 
```
$('selector').click(function (event) {
    alert($(this).index());
});

```

[jsfiddle](http://jsfiddle.net/bCTAh/)
if you are using .bind(this), try this:

`let index = Array.from(evt.target.parentElement.children).indexOf(evt.target);`

```
$(this.pagination).find("a").on('click', function(evt) {
        let index = Array.from(evt.target.parentElement.children).indexOf(evt.target);

        this.goTo(index);
    }.bind(this))

```