Pjax animations

前端 未结 3 1583
感情败类
感情败类 2021-02-14 02:54

I finally got pjax working, but I have another question.. How do I add some jquery animation like fadeout/slideup old content and fadein/slidedown new content?

By defaul

3条回答
  •  野性不改
    2021-02-14 03:07

    I guess that a loading indicator and an animation are more or less the same thing. In that case, use pjax:send and pjax:complete events.

    From pjax readme,

    send and complete are a good pair of events to use if you are implementing a loading indicator. They'll only be triggered if an actual request is made, not if it's loaded from cache.

提交回复
热议问题