Comments (4)
Pjax requests can be identified by the x-pjax
HTTP request header field. Pjax config shouldn't be changed by the server response.
from pjax-api.
Thank you for your response. What is still not clear to me is what is mentioned in the documentation here https://falsandtru.github.io/pjax-api/ which states "Multiple area update" support.
Imagine that I have a handler setup correctly and I check the x-pjax header, how would I tell the plugin to correctly update 2 parts in the webpage - ajax would send new filter form and new content body.
from pjax-api.
See the usage section. This config updates the header and the primary element if present.
new Pjax({
areas: [
// Try the first query.
'#header, #primary',
// Retry with the second query when the first query doesn't match.
'#container',
// Retry.
'body'
]
});
from pjax-api.
I have checked the usage section multiple times and it is not clear to me. Would you be so kind and answer my questions to give me clarity?
Example:
One clickable link Test link
Html wil contain two divs, one with #header, second #primary.
Questions:
- How do I tell the Pjax on which elements to listen? In this case "test" link.
- How should I format the response from /api/test endpoint so that it can render Hellounder #header andWorldunder #primary.
from pjax-api.
Related Issues (20)
- Interop with Webpack HOT 9
- End of support for Edge browser HOT 1
- Not working on page with external Javascript HOT 5
- merge laravel pjax error HOT 1
- Animation between page navigation HOT 2
- Uncaught TypeError HOT 4
- Hello HOT 1
- ファイルサイズの削減のお願い HOT 3
- Hello, HOT 1
- Error when Cache-Control is not set HOT 2
- IE11 support - will running through babel solve it? HOT 5
- Adding more events, preventing unload on condition HOT 4
- Ajax POST method become GET HOT 1
- Support Firefox add-ons execution environment HOT 9
- The content of ajax request, click back will disappear HOT 1
- How do you use the sequence property? HOT 12
- Forms with POST method doesn't work HOT 2
- how to keep css throught pages? HOT 2
- I can not request same url after upgrading from 3.35.3 to 3.38.1 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pjax-api.