jQuery delay to work with append()

前端 未结 3 2228
忘了有多久
忘了有多久 2021-02-15 11:59

I can\'t make the delay function of jQuery works with append function. What is wrong? Is there a way to make it work? I want to avoid using setTimeout

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-15 12:52

    Yes. The return from delay is immediate. Nothing in your code suggest that the reurn should wait. You need to use setTimeout for the engine to wait..

提交回复
热议问题