Slight confusion with description of effect function behaviour
@arthurvr ci sta già lavorando.
Dal 6/6/2015.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 914
- Fork
- 472
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di jquery/learn.jquery.com
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jquery/learn.jquery.com#828 ·
-
Word(s) missing in article?Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaChapter: events
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
jquery/learn.jquery.com#751 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
jquery/learn.jquery.com#814 · 1 commento ·
-
Chapter: jquery-core help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
jquery/learn.jquery.com#799 ·
-
Chapter: plugins
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
jquery/learn.jquery.com#796 ·
Tutte le issue di jquery/learn.jquery.com
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
good first issue help wanted javascript up-for-grabs
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
andrewsiah/agentswarm-data-tasks#307 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
coder/claudecode.nvim#588 ·
I maintainer di solito rispondono entro 1 giorno
-
area: web tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
digitalbazaar/http-client#60 ·