Skip to content

Commit

Permalink
Grammar, capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Mar 13, 2015
1 parent e5e9654 commit 313a48d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@

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.

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.
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.

For [browsers that don't support pushState][compat] pjax fully degrades.

Expand All @@ -50,7 +54,9 @@ Consider the following page.
</html>
```

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.
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.

We do this by telling pjax to listen on `a` tags and use `#pjax-container` as the target container:

Expand Down Expand Up @@ -88,7 +94,7 @@ Via [Bower][]:
$ bower install jquery-pjax
```

Or add `jquery-pjax` to your apps `bower.json`.
Or, add `jquery-pjax` to your app's `bower.json`.

``` json
"dependencies": {
Expand All @@ -112,7 +118,10 @@ Requires jQuery 1.8.x or higher.

## Compatibility

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.
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.

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`.

Expand Down

0 comments on commit 313a48d

Please sign in to comment.