You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,11 @@
25
25
26
26
pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button.
27
27
28
-
pjax works by grabbing html from your server via ajax and replacing the content of a container on your page with the ajax'd html. It then updates the browser's current url using pushState without reloading your page's layout or any resources (js, css), giving the appearance of a fast, full page load. But really it's just ajax and pushState.
28
+
pjax works by grabbing html from your server via ajax and replacing the content
29
+
of a container on your page with the ajax'd html. It then updates the browser's
30
+
current URL using pushState without reloading your page's layout or any
31
+
resources (JS, CSS), giving the appearance of a fast, full page load. But really
32
+
it's just ajax and pushState.
29
33
30
34
For [browsers that don't support pushState][compat] pjax fully degrades.
31
35
@@ -50,7 +54,9 @@ Consider the following page.
50
54
</html>
51
55
```
52
56
53
-
We want pjax to grab the url `/page/2` then replace `#pjax-container` with whatever it gets back. No styles or scripts will be reloaded and even the h1 can stay the same - we just want to change the `#pjax-container` element.
57
+
We want pjax to grab the URL `/page/2` then replace `#pjax-container` with
58
+
whatever it gets back. No styles or scripts will be reloaded and even the `<h1>`
59
+
can stay the same - we just want to change the `#pjax-container` element.
54
60
55
61
We do this by telling pjax to listen on `a` tags and use `#pjax-container` as the target container:
56
62
@@ -88,7 +94,7 @@ Via [Bower][]:
88
94
$ bower install jquery-pjax
89
95
```
90
96
91
-
Or add `jquery-pjax` to your apps`bower.json`.
97
+
Or, add `jquery-pjax` to your app's`bower.json`.
92
98
93
99
```json
94
100
"dependencies": {
@@ -112,7 +118,10 @@ Requires jQuery 1.8.x or higher.
112
118
113
119
## Compatibility
114
120
115
-
pjax only works with [browsers that support the `history.pushState` API][compat]. When the API isn't supported pjax goes into fallback mode: `$.fn.pjax` calls will be a no-op and `$.pjax` will hard load the given url. This mode targets the browser requirements of the jQuery version being used.
121
+
pjax only works with [browsers that support the `history.pushState`
122
+
API][compat]. When the API isn't supported pjax goes into fallback mode:
123
+
`$.fn.pjax` calls will be a no-op and `$.pjax` will hard load the given URL.
124
+
This mode targets the browser requirements of the jQuery version being used.
116
125
117
126
For debugging purposes, you can intentionally disable pjax even if the browser supports `pushState`. Just call `$.pjax.disable()`. To see if pjax is actually supports `pushState`, check `$.support.pjax`.
0 commit comments