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

Question about line of code. #476

Closed MrBunny956 closed 11 years ago

MrBunny956 commented 11 years ago

In anythingSlider.js line 456 w = base.$outer.css('height','').width() - base.outerPad[0];

I notice that this is removing the height of my container element is this on purpose and if so any idea why that is?

Thanks

Mottie commented 11 years ago

Hmm, that looks like a mistake. The height should be cleared on the base.$wrapper before checking the base.$outer width. This was an attempt to prevent the slider from constantly expanding in height (when the expand option is true) when placed directly inside of the document body. Either way, if the height is set in the css, it shouldn't effect the height of the wrapper.

I'll double check that the fix I mentioned will work and update the repository.

Edit: After a bit of testing, it doesn't seem to make any difference with or without that bit of code. I'll go ahead and remove it because it is effecting elements outside the scope of the slider.