determine if content in a pjax container is changed or not #149

Closed
opened 2018-04-15 19:06:02 -05:00 by cpetro · 2 comments
cpetro commented 2018-04-15 19:06:02 -05:00 (Migrated from github.com)

If I use the default behaviour of pjax, with no switches , only the new (additional) content appears to load, and any existing content that is already on the page just stays where it is, this is good but it cannot be animated

is there a way to animate only the new content , and leave the existing content in its place unless it is being removed/ changed? how can I create a new switch callback to do this ? is there a way to know if the content in a container has changed or not , and if it has then only animate the the new content and leave the old

If I use the default behaviour of pjax, with no switches , only the new (additional) content appears to load, and any existing content that is already on the page just stays where it is, this is good but it cannot be animated is there a way to animate only the new content , and leave the existing content in its place unless it is being removed/ changed? how can I create a new switch callback to do this ? is there a way to know if the content in a container has changed or not , and if it has then only animate the the new content and leave the old
BehindTheMath commented 2018-04-27 09:53:44 -05:00 (Migrated from github.com)

There's no way out of the box to know which content has been switched, unless you create your own switch and keep track.

If you just want to animate the new content, create your own switch and do it there. Take a look at the README for how to do that.

There's no way out of the box to know which content has been switched, unless you create your own switch and keep track. If you just want to animate the new content, create your own switch and do it there. Take a look at the [README](https://github.com/MoOx/pjax#switches-object-default-) for how to do that.
BehindTheMath commented 2018-05-27 18:00:08 -05:00 (Migrated from github.com)

Closing due to lack of follow-up from OP.

Closing due to lack of follow-up from OP.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#149