Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve collection item selector #41

Closed
acostami opened this issue Jul 15, 2015 · 0 comments
Closed

Improve collection item selector #41

acostami opened this issue Jul 15, 2015 · 0 comments

Comments

@acostami
Copy link
Contributor

Given the following HTML

<ul>
  <li class="original">Original</li>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

In order to select all items except the original one I would build a PO collection which looks like:

items: collection({
  scope: 'li:not(.original)',

  item: {
  }
})

In order to access the items, I would have to write something like page.items(1), but this is not working with the current implementation because the selector will be $("li:not(.original):nth-of-type(1)") and the result will be empty in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants