Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •