TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Find the jQuery Bug #8: Suspicious Selectors

5 pointsby elijahmanorabout 13 years ago

2 comments

pieterabout 13 years ago
This post seems to completely miss the point of selectors and how you can match classnames and use pseudo selectors. This isn't a bug in jQuery at all, but just the way css selectors work.<p>Especially telling is this phrase:<p><pre><code> Here are some examples of invalid selectors in jQuery because they contain invalid characters: $( "#person.name" ).addClass( "highlight" ); // FAIL </code></pre> This is of course a perfectly valid selector, selecting a node that has both the id person and the class name. Saying that the selector is invalid is simply wrong.
elijahmanorabout 13 years ago
Are there other languages other than JavaServer Faces that puts weird characters inside the id attribute of elements?