TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Find the jQuery Bug #8: Suspicious Selectors

5 点作者 elijahmanor大约 13 年前

2 条评论

pieter大约 13 年前
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.
elijahmanor大约 13 年前
Are there other languages other than JavaServer Faces that puts weird characters inside the id attribute of elements?