scrollTo work only first time #197

Closed
opened 2019-02-12 06:57:54 -05:00 by nicdnepr · 6 comments
nicdnepr commented 2019-02-12 06:57:54 -05:00 (Migrated from github.com)

After first click page srolls to top
Second click don't scroll top

After first click page srolls to top Second click don't scroll top
nicdnepr commented 2019-02-12 07:58:59 -05:00 (Migrated from github.com)
http://pjax.awa.pp.ua/catalog/Transljacionnye-usiliteli-mo%C5%A1%C4%8Dnosti scroll down and click paging 2 times ![2019-02-12-145754_1920x1080_scrot](https://user-images.githubusercontent.com/2581487/52637007-b836f800-2ed6-11e9-8e5c-6d2a5de80335.png)
BehindTheMath commented 2019-02-12 22:00:26 -05:00 (Migrated from github.com)

That page doesn't load for me.

That page doesn't load for me.
nicdnepr commented 2019-02-13 01:10:01 -05:00 (Migrated from github.com)

Its impossible, url opens
Can you check on local server scrollTo for links in case links reloaded with pjax?

Its impossible, url opens Can you check on local server scrollTo for links in case links reloaded with pjax?
nicdnepr commented 2019-02-22 02:40:06 -05:00 (Migrated from github.com)

Any alive?

Any alive?
BehindTheMath commented 2019-03-03 12:27:52 -05:00 (Migrated from github.com)

When you click on one of the page numbers, Pjax run its handlers and afterwards a jQuery handler runs and makes the same request, which replaces the links and the Pjax handlers. You can check in devtools and see how after you click one of the links, the exact same request is made by Pjax and then jQuery, and then the Pjax attributes and handlers disappear. I can't spend hours debugging your site, bit it does not appear to be an issue with Pjax.

Like I mentioned before, this is a complex site, using jQuery and multiple instances of Pjax. This isn't really the use case Pjax was designed for, and I strongly suggest you use a library like Vue instead.

When you click on one of the page numbers, Pjax run its handlers and afterwards a jQuery handler runs and makes the same request, which replaces the links and the Pjax handlers. You can check in devtools and see how after you click one of the links, the exact same request is made by Pjax and then jQuery, and then the Pjax attributes and handlers disappear. I can't spend hours debugging your site, bit it does not appear to be an issue with Pjax. Like I mentioned [before](https://github.com/MoOx/pjax/issues/195#issuecomment-463036445), this is a complex site, using jQuery and multiple instances of Pjax. This isn't really the use case Pjax was designed for, and I strongly suggest you use a library like Vue instead.
nicdnepr commented 2019-03-05 06:52:48 -05:00 (Migrated from github.com)

Thanks for idea about jquery, I fixed this issue
But what about idea about #195
Not sure if problem with jquery

Thanks for idea about jquery, I fixed this issue But what about idea about #195 Not sure if problem with jquery
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#197