Renamed NodeCollection::index() to indexOf() since it has different behaviour to index in jQuery