Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
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
Old 01-10-2013, 08:32 AM   PM User | #2
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
Okay, I've tried a host of things, but am not getting results I expect. Is callback doing what I think it is or something different? I have now posted a copy of the site(IE users beware, I haven't formatted for IE!) at http://blah.eu5.org/ if that helps anyone as it's making me pull my hair out.

As someone new to jQuery, I think I may have bitten off more than I can chew!
Splatter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:01 AM.


Advertisement
Log in to turn off these ads.