Skip to content
This repository was archived by the owner on Nov 28, 2019. It is now read-only.

Commit aa39dcb

Browse files
committed
Add version 1.0.5 - pure requests
1 parent fd0da17 commit aa39dcb

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Master
1+
# 1.0.5 (2013-08-27)
22

3+
* Add pure request calls
4+
* Remove options from pjaxr:click event
35
* Fix namespace replacement on popstate
46

57
# 1.0.4 (2013-08-22)

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ There is already an awesome plugin called [jquery-pjax](https://github.com/defun
2828

2929
## Installation
3030

31-
* Download the latest release: [v1.0.4](https://github.com/minddust/jquery-pjaxr/archive/v1.0.4.zip)
31+
* Download the latest release: [v1.0.5](https://github.com/minddust/jquery-pjaxr/archive/v1.0.5.zip)
3232
* Clone the repository: `git clone [email protected]:minddust/jquery-pjaxr.git`.
3333
* Curl the library: `curl -O https://raw.github.com/minddust/jquery-pjaxr/master/jquery.pjaxr.min.js`
3434
* Install with [Bower](http://bower.io): `bower install jquery-pjaxr`.
@@ -55,7 +55,7 @@ if ($.support.pjaxr) {
5555
}
5656
```
5757

58-
Or - you can call the click handler by yourself and wrap it with some additional start functionality like this:
58+
Or you can call the click handler by yourself and wrap it with some additional start functionality like this:
5959

6060
```javascript
6161
if ($.support.pjaxr) {
@@ -65,6 +65,12 @@ if ($.support.pjaxr) {
6565
}
6666
```
6767

68+
Or you can make a pjaxr request by pure calling:
69+
70+
```javascript
71+
$(document).pjaxr.request('/about/', {timeout: 1337});
72+
```
73+
6874
If you are migrating an existing site you probably don't want to enable pjaxr everywhere just yet. Instead of using a global selector like `a` try annotating pjaxrable links with `data-pjaxr`, then use `'a[data-pjaxr]'` as your selector.
6975

7076
### data-pjaxr-namespace

jquery.pjaxr.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
}
1818

1919
function request(link, options) {
20-
if (typeof link == "string") {
21-
var link_element = document.createElement("a");
20+
// enables pure request calls
21+
if (typeof link === 'string') {
22+
var link_element = document.createElement('A');
2223
link_element.href = link;
2324
link = link_element;
2425
}
@@ -224,7 +225,7 @@
224225
return;
225226
}
226227

227-
if (!fire('pjaxr:click', [opts])) {
228+
if (!fire('pjaxr:click')) {
228229
event.preventDefault();
229230
return;
230231
}

jquery.pjaxr.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)