CSS-Tricks / MovingBoxes

Simple horizontal slider which grows up the current box when it's in focus (image, title & text) and back down when it's not in focus.
http://css-tricks.github.io/MovingBoxes/
GNU Lesser General Public License v3.0
280 stars 147 forks source link

Clicking an item before events bind causes events to not bind #29

Closed ghost closed 13 years ago

ghost commented 13 years ago

If an item is clicked before the setTimeout on line #93 is triggered, the events never get bound.

A work around for me is to set the initial speed to 0 and and then change it back with slider.options.speed = 500 on a subsequent event.

Mottie commented 13 years ago

I can't seem to duplicate this. What browser are you using?

ghost commented 13 years ago

Chromium under Linux

Mottie commented 13 years ago

Hi Aptidude!

Well I don't know what to tell you, I can't duplicate it, but I think it would be best to move the bind events out of the setTimeout anyway. I originally put it in there to prevent event spamming during initialization. But I see I already have an initialization flag to prevent it. So, I'll include this change in my next update - when I get around to debugging the other changes LOL.

Thanks for bringing this to our attention!

Mottie commented 13 years ago

Hi Aptidude!

Ok, I figured out the problem. It's been fixed in version 2.1. Thanks for reporting this issue!