Comments (8)
Did a quick search: https://github.com/kossnocorp/jquery.turbolinks sounds like it should solve the problem.
I've never worked with Turbolinks but my understanding is that it can easily break a lot of jQuery plugins that rely on certain events to initialise. If the above doesn't work then some changes to ScrollMe's event bindings may be required.
from scrollme.
I'm already using that :(—
Sent from Mailbox
On Tue, Jun 17, 2014 at 5:58 PM, Nick Pearson [email protected]
wrote:
Did a quick search: https://github.com/kossnocorp/jquery.turbolinks sounds like it should solve the problem.
I've never worked with Turbolinks but my understanding is that it can easily break a lot of jQuery plugins that rely on certain events to initialise. If the above doesn't work then some changes to ScrollMe's event bindings may be required.
Reply to this email directly or view it on GitHub:
#3 (comment)
from scrollme.
Bit of a stab in the dark here - can you try replacing line 374:
$document.ready( function(){ init(); } );
with this:
$document.on( 'ready page:load' , function(){ init(); } );
And let me know if that works?
I realise this probably isn't the right way to do this - am still a bit of a noob with GitHub!
from scrollme.
That seems to solve the first issue!
Still doesnt want to work when hitting that back button though... I'll see if I can do some digging too
from scrollme.
Ok this works:
$document.on( 'ready page:load page:change' , function(){ init(); } );
So, it has to trigger on page:load
as normal (incase animation is on the start page), and has to trigger on page:change
incase the page has changed to a cached version.
Seems to be the only combo that worked for me... although I could swap either for one or two other event names, but it would still require 2 calls each time...
from scrollme.
That makes perfect sense.
I'm tempted to include as you've put it but I'm a little unsure about the consequences of attempting to bind to non-existent events.
from scrollme.
Maybe a new branch? :)—
Sent from Mailbox
On Thu, Jun 19, 2014 at 6:55 PM, Nick Pearson [email protected]
wrote:
That makes perfect sense.
I'm tempted to include as you've put it but I'm a little unsure about the consequences of attempting to bind to non-existent events.
Reply to this email directly or view it on GitHub:
#3 (comment)
from scrollme.
Rather than make a new branch I've added an array of events to bind the init() to so other can easily be added in future if need be. (http://xkcd.com/974/ ...)
As far as I can tell, if the event handler doesn't exist the binding will take place but the event will of course never be fired. Therefore, this shouldn't impact any cases where Turbolinks isn't present. Any further enlightenment on the topic would be most welcome!
from scrollme.
Related Issues (20)
- Element in final position before animations starts - jumpy animations HOT 1
- Problem with jquery 3.2.1? HOT 4
- How to Reload ScrollMe and Data-Attrs? HOT 5
- Animation only during first scroll HOT 1
- the plugin does not work
- Problem with wordpress
- Problem with wordpress HOT 1
- NPM
- Not working with Angular 5
- Not working with mobile
- Setting fixed height to data-from and data-to
- Doesn't work with jquery 3.3.1 HOT 8
- Weird behaviour on touch devices HOT 1
- Its not working with div element while body & html's overflow hidden HOT 1
- data-opacity from 0 to 1
- problem with scrollbar HOT 1
- Can I use for my portfolio site? Not seeing a license info. HOT 1
- Animation is finished before element reaches viewport HOT 1
- Elements do not stand at start position outside of viewport HOT 1
- Doesn't work with jquery 3.4.1 HOT 2
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 scrollme.