about history and loadUrl not effective #151

Closed
opened 2018-04-16 22:58:55 -05:00 by jcleng · 8 comments
jcleng commented 2018-04-16 22:58:55 -05:00 (Migrated from github.com)

useing
var pjax = new Pjax({ selectors: ["body"], history: true });
the history not effective,and
pjax.loadUrl("3.html", { requestOptions: { timeout: 200 }, });
useing pjax.loadUrl without history

useing `var pjax = new Pjax({ selectors: ["body"], history: true });` the history not effective,and ` pjax.loadUrl("3.html", { requestOptions: { timeout: 200 }, }); ` useing pjax.loadUrl without history
BehindTheMath commented 2018-04-16 23:02:52 -05:00 (Migrated from github.com)

The history option is true by default; there's no need to set it manually.

What are you trying to accomplish?

The `history` option is `true` by default; there's no need to set it manually. What are you trying to accomplish?
jcleng commented 2018-04-16 23:13:07 -05:00 (Migrated from github.com)

@BehindTheMath i will trying to accomplish this:
pjax.loadUrl("3.html", { requestOptions: { timeout: 200 }, }); and to change my history with browser,but ,loadUrl without changge browser history . maybe is my problem,?

@BehindTheMath i will trying to accomplish this: `pjax.loadUrl("3.html", { requestOptions: { timeout: 200 }, });` and to change my history with browser,but ,loadUrl without changge browser history . maybe is my problem,?
BehindTheMath commented 2018-04-16 23:21:26 -05:00 (Migrated from github.com)

Calling pjax.loadUrl() should add that page to the top of the history stack. Is that not happening?

Calling `pjax.loadUrl()` should add that page to the top of the history stack. Is that not happening?
jcleng commented 2018-04-16 23:27:55 -05:00 (Migrated from github.com)

@BehindTheMath notworking

@BehindTheMath notworking
BehindTheMath commented 2018-04-16 23:31:38 -05:00 (Migrated from github.com)

The history under the back button stays the same?

Try cloning the repo, and run npm run example in the console. Click one of the button on the example page and check if the history changes.

The history under the back button stays the same? Try cloning the repo, and run `npm run example` in the console. Click one of the button on the example page and check if the history changes.
jcleng commented 2018-04-16 23:35:35 -05:00 (Migrated from github.com)

@BehindTheMath but i not useing npm ,useing <script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script>,can't working for this?

@BehindTheMath but i not useing npm ,useing `<script src="https://cdn.jsdelivr.net/npm/pjax/pjax.min.js"></script>`,can't working for this?
BehindTheMath commented 2018-04-16 23:54:25 -05:00 (Migrated from github.com)

Can you check the console in the browser and see if there are any errors?

Can you check the console in the browser and see if there are any errors?
jcleng commented 2018-04-17 00:25:43 -05:00 (Migrated from github.com)

@BehindTheMath 0 errors,maybe rewrite source code

@BehindTheMath 0 errors,maybe rewrite source code
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#151