CSS-Tricks/MovingBoxes

initAnimation: false not working

Alfazo opened this issue · 10 comments

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!

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

Ok, this should be fixed in v2.2.15.

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.

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!

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

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?

@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).

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

@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.

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??