question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

:lt() and :gt() selectors

See original GitHub issue

In the Jsoup we have :lt(n) and :gt(n) selectors to select elements with index little/greater than n. I think it is nice to have these selectors alternatives in the soupsieve.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
facelessusercommented, Nov 18, 2020

For the reasoning stated above, I think we are going to pass on these selectors.

@gir-bot add S: wontfix

1reaction
facelessusercommented, Nov 18, 2020

Yeah. When I first created soupsieve, I think I looked at some similar selectors before but came to the same conclusion. While I guess the shorthand is “more” convenient, it just didn’t seem like it added enough to warrant including them. To be honest, if I implemented it, it would end up being basically an alias for what I showed above, and that is why I think I would probably consider not doing them. It’s just quite trivial to do the same thing with :nth- selectors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chaining jQuery selectors :lt and :gt - Stack Overflow
If I do this : $('table tr:gt(3):lt(6)') , shall I receive 3 or 6 elements at the end, and why? Are all selectors...
Read more >
jQuery :gt() Selector - W3Schools
The :gt() selector selects elements with an index number higher than a specified number. The index numbers start at 0. This is mostly...
Read more >
:gt() Selector | jQuery API Documentation
As of jQuery 3.4, the :gt pseudo-class is deprecated. Remove it from your selectors and filter the results later using .slice() . For...
Read more >
jQuery :lt() selector - javatpoint
We can use the :gt() selector to select the elements having a larger index value than the specified index. Syntax. $(":lt(index)").
Read more >
jQuery Full Tutorial in Hindi - YouTube
jQuery gt() lt() Selector | jQuery Selector | jQuery Full Tutorial in Hindi. 51 views 3 months ago. Sahosoft Solutions. Sahosoft Solutions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found