On the distinction between jQuery core methods ( .each() ) in the $.fn name space and jQuery utility methods ( $.each() ) not in the $.fn name space
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, jquery
调研方向
从链接的 Learn jQuery URL 中的 Using jQuery Core 章节及其“$ vs $()”部分开始。修改说明,区分 .each() 和 $.each(),阐明 $.fn 和对象方法的术语,并补充 namespace 上下文或引用;当面向初学者明确说明这一差异时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
The Using jQuery Core chapter begins with the section titled $ vs $().
It's my thought that some additional wording could make the section's lessons more easily realized.
That section draws the distinction between jQuery core (object) methods called on jQuery selections and jQuery utility methods not called on selections. Thrown in on top of that is the further distinction between the $.fn namespace and the $ namespace.
Core (object) methods are identified simply by their names ( .each() ) but are in the $.fn namespace.
Utility methods ( $.each() ) are explicitly identified as members of the jQuery namespace, $, and are not in the $.fn namespace.
Get it?
.each() in $.fn namespace.
$.each() not in $.fn namespace.
My point is that that distinction is not so clearly made in the article. It took me several readings and a day's rumination before the fog lifted. I think that the jQuery novice, who is after all the section's target, would be better served by a more explicit and specific drawing of the distinction than is currently the case.
The point might also be explicitly made that core methods (.remove()) are also called object methods because they have an object, i.e., the jQuery selection ( $( "h1" ) ) upon which they are called ( $( "h1" ).remove() ). I think that would make the terminology seem more sensible and less arbitrary.
May I also suggest that this would be the place to give some insight into the namespace concept, just a paragraph or two. If not, then at least a citation to an article explaining the concept.
- 主要语言
- JavaScript
- 星标
- 914
- 派生
- 472
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jquery/learn.jquery.com 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
jquery/learn.jquery.com#828 ·
-
Word(s) missing in article?可能重新可做 关联的 PR 已关闭且未合并。 未关闭Chapter: events
难度 1/5 1 小时以内 新手友好度 70/100
jquery/learn.jquery.com#751 ·
-
难度 3/5 1-2 天 新手友好度 25/100
jquery/learn.jquery.com#814 · 1 条评论 ·
-
Chapter: plugins
难度 2/5 1-3 小时 新手友好度 35/100
jquery/learn.jquery.com#796 ·
-
Chapter: plugins
难度 2/5 1-3 小时 新手友好度 35/100
jquery/learn.jquery.com#782 ·
查看 jquery/learn.jquery.com 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
good first issue help wanted javascript up-for-grabs
难度 2/5 1-3 小时 新手友好度 78/100
andrewsiah/agentswarm-data-tasks#307 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
coder/claudecode.nvim#588 ·
维护者通常 1 天内回复
-
area: web tech debt
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
digitalbazaar/http-client#60 ·