Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

2 slides and the disabled class #8

Closed srobbin closed 13 years ago

srobbin commented 13 years ago

Hi Mat,

First off, thanks for the great plugin! It's been tremendously helpful in a project we're working on.

I noticed that the prev button was staying disabled on carousels where I only had two slides. Essentially, it was causing a case outside of those described in the switch statement around line 33. I removed the default behavior, and made it something that occurred on each click, before the 'disabled' class as assigned.

Hope this is helpful to others. Thanks, again.

Cheers, Scott

Wilto commented 13 years ago

Awesome, man—can’t wait to see what you’re doing with it. Let me know if there’s anything I can do to help you guys out! Thanks!

srobbin commented 13 years ago

Wow, you pulled that fast! Thank you.

We just launched the site last night:

http://centralstory.com

Thanks again for the code.

Cheers, Scott