Slight confusion with description of effect function behaviour
@arthurvr 已经在做这个了。
开始于 2015年6月6日。
评估
这个 Issue 还没有评估数据。
描述
Hi there,
I'm a newbie who is reading through your (excellent) description, thanks for your good work!
At one point I stumbled, and I would like to share my confusion with you.
On section http://learn.jquery.com/effects/intro-to-effects/#doing-something-after-an-animation-completes, there is the statement:
"A common mistake when implementing jQuery effects is assuming that the execution of the next method in your chain will wait until the animation runs to completion. [...] It is important to realize that .fadeIn() above only kicks off the animation. Once started, the animation is implemented by rapidly changing CSS properties in a JavaScript setInterval() loop."
Later on the same page, in section http://learn.jquery.com/effects/intro-to-effects/#delay-, there is an example that seems to contradict what we've learned above:
// Hide all level 1 headings over half a second; then wait for 1.5 seconds
// and reveal all level 1 headings over 0.3 seconds
$( "h1" ).hide( 500 ).delay( 1500 ).show( 300 );
I first thought, the description might be a mistake, but according to the API documentation, this is exactly how delay() behaves. My only explanation to this is that jQuery internally checks if chained function calls refer to animations as well - and if so, chains these animations as well, probably using an animation queue. It would be much clearer if this would be explicitly stated on that page to avoid reader's confusion.
- 主要语言
- 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: jquery-core help wanted
难度 2/5 1-3 小时 新手友好度 45/100
jquery/learn.jquery.com#799 ·
-
Chapter: plugins
难度 2/5 1-3 小时 新手友好度 35/100
jquery/learn.jquery.com#796 ·
查看 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 ·