Would you prefer using `$.index()`?

```
var listItem = $(this).parents('li');
$('container li').index(listitem);
```