I have been fiddling with scrollpath ( http://joelb.me/scrollpath/ , source available via link 7).
I have been looking at having pieces animate on arrival at the correct “screen”. I’m not great at jQuery, but I find poking at someone else’s code to be the best way for me to learn. The problem I am having, is what I think SHOULD work, doesn’t always work.
I have an example up at http://blah.eu5.org/ which shows my problem. If you click “types”, the chicken wont move. If you then click “benefits”, it won’t move again. However, if you click from “About” to “benefits”, it will. It seems to only trigger the callback if I move 2 windows away. It also works if I tap down then up on arriving at the window.
On a side note, I was hoping I could get the chicken to scroll through all movements on the path to where you clicked, instead of going straight. Is this possible without much difficulty using this code?
The code I am looking at is in script/slide.js.
.moveTo(400, 300, {
callback: function() {
$(".chicken").animate({"top": "300px","left": "286px"}, 1000, "easeInOutSine");
},
name: "about"
})
This is how I am calling it. I beleive .moveTo is handled in scripts/jquery.scrollpath.js. I’m still learning so maybe there is something more needed that I am missing, if so, please let me know.
Just binned it and wrote from scratch.