Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by JimDabell

21 hours ago

> $() CSS parsing and DOM traversal was way slower than querySelector or getElementById, both of which predate jquery by years.

You have that backwards – jQuery predates querySelector by years.

The reason why getElementById is fast is because it’s a simple key lookup.

0 comments

JimDabell

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities