CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

Add Options Validation #568

Closed tenub closed 11 years ago

tenub commented 11 years ago

Would be nice to fallback to a default theme or throw an error or something if someone mistypes a theme string for example. As of now the plugin simply breaks.

JamyGolden commented 11 years ago

AnythingSlider doesn't actually "break" if you mistype the theme. It adds an incorrect class name to the body, so the CSS doesn't get applied to the slider so it looks like it's "broken".

Unfortunately there isn't a list of supported themes within the slider. Anyone can create their own AnythingSlider theme at any time.

Mottie commented 11 years ago

As @JamyGolden said, AnythingSlider doesn't break, but likely doesn't work as expected then a theme isn't applied. Tthere isn't any easy way to detect if a theme is loaded. I mean, a theme can contain or modify anything pertaining to the slider so there isn't one attribute you can target and definitely say, oh yeah a theme has been applied. So, I'm going to go ahead and close this issue. Sorry for any inconvenience!