Skip to content

initAnimation: false not working #79

Closed
Alfazo opened this Issue Apr 23, 2012 · 10 comments

3 participants

@Alfazo
Alfazo commented Apr 23, 2012

Hi again!

I'm having an issue with "initAnimation: false" not working (and thus MovingBoxes scrolling the slider when I don't want it to) on page load.

A demo of this:
http://alpha.may-ninth.co.uk/work

Please note that the scrollTop is normal/wanted behaviour, and not a bug with MovingBoxes.

Any help would be appreciated!

@Mottie
CSS-Tricks member
Mottie commented Apr 23, 2012

Hmm, that is a problem. Thanks for reporting it.

@Mottie
CSS-Tricks member
Mottie commented Apr 24, 2012

Ok, this should be fixed in v2.2.15.

@Alfazo
Alfazo commented Apr 24, 2012

Hmm, it seems that it's stopped it doing it on loading the first slide, but if you put in a specific slide — alpha.may-ninth.co.uk/work/#samme — it still scrolls.

@Mottie
CSS-Tricks member
Mottie commented Apr 24, 2012

Hmm, yeah it was working fine locally, but with image loading delay I see it is still an issue... It's not a simple fix so give me a bit more time. Thanks!

@Mottie
CSS-Tricks member
Mottie commented Sep 18, 2012

Ok, I ended up completely rewriting the initialization function so hopefully this bug has been stomped flat. :P

@Mottie Mottie closed this Oct 9, 2012
@dubdesign

this problem seems to have reappeared for me. I'm using version 2.3.4
also when the slider animates to the chosen panel the "completed" callback is not firing so my image loader function that i run from within the callback is also not running. The initChange callback isn't firing either which i assume is the reason completed doesn't fire?

@Mottie
CSS-Tricks member
Mottie commented Mar 25, 2013

@dubdesign Check out this (demo)... the slider starts on the third panel without the beginning animation and all events are showing up properly in the event window underneath.

So, it looks like everything is working perfectly to me. Are you not seeing the same thing? If not, what browser are you seeing the problem in? Are there any javascript errors on your page (press F12 and look at the console).

@dubdesign

hi, thanks for your reply. Easiest thing is probably to show you an example
http://samreedphotography.co.uk/gallery/wedding-photography-collection-2#1100

as you can see it opens up on the 1st image and then transitions to the selected image (which wont actually load for you), i use chrome and firefox and both have the same problem. I've added console.log messages on the callbacks so that you can see whats happening.

It has worked in the past but i dont know at what point it stopped as i've only just started using git so cant go back and look at changes

Thanks

@Mottie
CSS-Tricks member
Mottie commented Mar 26, 2013

@dubdesign Hmm, I sorry I don't have a lot of time to troubleshoot the problem you're having... but from looking at the console log, I'm not sure why the "completed callback" is the first event and the "initialized callback... imageSwap has been called from initialized" is shown twice! The initialized function should only be called once.

So I added another call to the plugin in this demo and it did the same thing!...

completed... initialized... initialized

So look in your code for a second call to the plugin, and I'll open a new issue (#112) so I can keep track of this problem.

@dubdesign

no problem, i appreciate you taking the time to look. I checked the code and the plugin is only called once. I've now reverted to v2.3 and that has fixed my problem so i guess something is conflicting with v2.3.4
in 2.3 i'm getting initialized... initChange... initialized... completed... so initialized is still being fired twice but it seems to function ok.
might be worth mentioning that i use a window resize event which you helped me with previously, i dont know if that would have anything to do the the initialized being run twice??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.