I need to do some transitions between pages where the new content slides up over the old.
if i use this code https://unpkg.com/pjax/pjax.js and the switches example code then I get "Uncaught TypeError: Cannot read property 'sideBySide' of undefined".
I need to do some transitions between pages where the new content slides up over the old.
if i use this code https://unpkg.com/pjax/pjax.js and the switches example code then I get "Uncaught TypeError: Cannot read property 'sideBySide' of undefined".
Can you update https://unpkg.com/pjax/pjax.js so it works plz ! Thanks
We're currently actively working on fixing as many bugs as possible and closing old issues. When we're done, a new version will be pushed to NPM (which is where unpkg pulls from).
In the meantime, you can clone the repo and build it yourself by running npm run standalone.
This issue should be already fixed in the repo.
We're currently actively working on fixing as many bugs as possible and closing old issues. When we're done, a new version will be pushed to NPM (which is where unpkg pulls from).
In the meantime, you can clone the repo and build it yourself by running `npm run standalone`.
I'm still gettig this issue "Cannot read property 'sideBySide' of undefined", under version 0.2.5. Thank you in advance for your help.
I'm still gettig this issue "Cannot read property 'sideBySide' of undefined", under version 0.2.5. Thank you in advance for your help.
<img width="630" alt="" src="https://user-images.githubusercontent.com/1133430/36062121-1ea7f54a-0e66-11e8-905c-c5cf5efd2de8.png">
@jbrhel Can you post your code? Modifying example/example.js to use the sideBySide switch function works as expected under 0.2.5.
var pjax = new Pjax({
elements: [".js-Pjax"],
selectors: [".body"],
switches: {
'.body': Pjax.switches.sideBySide
}
})
@jbrhel Can you post your code? Modifying `example/example.js` to use the `sideBySide` switch function works as expected under 0.2.5.
```
var pjax = new Pjax({
elements: [".js-Pjax"],
selectors: [".body"],
switches: {
'.body': Pjax.switches.sideBySide
}
})
```
@robinnorth Thank you for your comment. My code was:
var main_pjax = new Pjax({
cacheBust: false,
elements: ['#aside a:not(.no-ajax), #content-header a, #nav a, .app-header a'],
selectors: ['title', '#content-header', '#content-footer', '#content-main'],
switches: {
'#content-main': function(oldEl, newEl, options, switchOptions){
this.switches.sideBySide.bind(this)(oldEl, newEl, options, switchOptions);
}
},
switchesOptions: {
'#content-main': switch_h_option
}
});
So I replaced this by Pjax and it's working now.
@robinnorth Thank you for your comment. My code was:
```
var main_pjax = new Pjax({
cacheBust: false,
elements: ['#aside a:not(.no-ajax), #content-header a, #nav a, .app-header a'],
selectors: ['title', '#content-header', '#content-footer', '#content-main'],
switches: {
'#content-main': function(oldEl, newEl, options, switchOptions){
this.switches.sideBySide.bind(this)(oldEl, newEl, options, switchOptions);
}
},
switchesOptions: {
'#content-main': switch_h_option
}
});
```
So I replaced **this** by **Pjax** and it's working now.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I need to do some transitions between pages where the new content slides up over the old.
if i use this code https://unpkg.com/pjax/pjax.js and the switches example code then I get "Uncaught TypeError: Cannot read property 'sideBySide' of undefined".
Can you update https://unpkg.com/pjax/pjax.js so it works plz ! Thanks
This issue should be already fixed in the repo.
We're currently actively working on fixing as many bugs as possible and closing old issues. When we're done, a new version will be pushed to NPM (which is where unpkg pulls from).
In the meantime, you can clone the repo and build it yourself by running
npm run standalone.Version 0.2.5 has been released to NPM.
I'm still gettig this issue "Cannot read property 'sideBySide' of undefined", under version 0.2.5. Thank you in advance for your help.
@jbrhel Can you post your code? Modifying
example/example.jsto use thesideBySideswitch function works as expected under 0.2.5.@robinnorth Thank you for your comment. My code was:
So I replaced this by Pjax and it's working now.
Hi @jbrhel, you're welcome! You can actually simplify your
switchesconfig even more to just'#content-main': Pjax.switches.sideBySide