View Single Post
Old 01-08-2013, 02:49 PM   PM User | #1
Splatter
New to the CF scene

 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Splatter is an unknown quantity at this point
Callback not working as expected in plugin

I've been playing around with the scrollpath code (Demo: http://joelb.me/scrollpath/ Source: https://github.com/JoelBesada/scrollpath). I'm using it to make a non rotating page(probably easier ways to do it, I know) but I want to move 1 element with each page.

To do this, I have been using...(in the file scripts/demo.js)

Code:
	$.fn.scrollPath("getPath")

		// Move to 'about' element
		.moveTo(400, 300, {
			callback: function() {
				$(".chicken").animate({"top": "300px","left": "286px"}, 1000, "easeInOutSine");
			},
			name: "about"})
The problem is, it doesn't seem to trigger when I browse using the menu, but does when I browse using arrow keys(but usually only when I go backwards). Is there something glaringly stupid I am doing?
Splatter is offline   Reply With Quote