Slight confusion with description of effect function behaviour
@arthurvr đang làm issue này rồi.
Từ ngày 6/6/2015.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 914
- Fork
- 472
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jquery/learn.jquery.com
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
jquery/learn.jquery.com#828 ·
-
Word(s) missing in article?Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởChapter: events
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
jquery/learn.jquery.com#751 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
jquery/learn.jquery.com#814 · 1 bình luận ·
-
Chapter: jquery-core help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
jquery/learn.jquery.com#799 ·
-
Chapter: plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
jquery/learn.jquery.com#796 ·
Tất cả issue của jquery/learn.jquery.com
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
good first issue help wanted javascript up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
andrewsiah/agentswarm-data-tasks#307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coder/claudecode.nvim#588 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: web tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
digitalbazaar/http-client#60 ·