How to find out whether PJax is property configured? #240

Closed
opened 2021-07-06 06:44:16 -05:00 by mkgn · 0 comments
mkgn commented 2021-07-06 06:44:16 -05:00 (Migrated from github.com)

I am using AdminLTE theme and only need left navigation menu links to work with PJax.

So I have below PJax configuration set

var pjax = new Pjax({
    elements: "a.js-pjax", // default is "a[href], form[action]"
    selectors: [".container-fluid"]
})

For each navigation link I have added "js-pjax" class like;

My selector works in console and lists the elements in the navigation that should work with PJax. .container-fluid is the div which should have the content replaced.

There is no error but nothing seems to happen. When I click the navigation links, the pages load with a full post and reset my menu (menu gets collapsed). If everything works fine I believe my menu shouldn't be refreshed right? How do you troubleshoot this?

I am using AdminLTE theme and only need left navigation menu links to work with PJax. So I have below PJax configuration set var pjax = new Pjax({ elements: "a.js-pjax", // default is "a[href], form[action]" selectors: [".container-fluid"] }) For each navigation link I have added "js-pjax" class like; <a href="@menu.UrlPath" class="nav-link js-pjax"> My selector works in console and lists the elements in the navigation that should work with PJax. .container-fluid is the div which should have the content replaced. There is no error but nothing seems to happen. When I click the navigation links, the pages load with a full post and reset my menu (menu gets collapsed). If everything works fine I believe my menu shouldn't be refreshed right? How do you troubleshoot this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#240