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

Hidden slider doesn't work when made active #639

Closed jrtapper closed 9 years ago

jrtapper commented 9 years ago

I am working on the dev site http://b2b.hitchfinderstores.com and I am using the anything slider tool in a couple of places on the home page. The issue is with the large grid of part categories on the bottom of the page.

When the page is initially loaded, the list grid of images arranged by "popularity" are displayed and the slider works to display the two panels of this grid. The second group of these images arranged alphabetically is hidden (display: none;) and the slider styling is applied to it.

When I un-hide the second group of images (using the drop down at the upper left corner) the slider width values are 0 . Removing these seems to make the panel appear and sort of start to work.

Is there a way that I can tell AnythingSlider to recompute these values when I make the second group active?

Thanks!

Mottie commented 9 years ago

Hi @jrtapper!

I'll test this when I get some more free time, but for now try re-initializing AnythingSlider without any options:

$('#slider').anythingSlider();

That "should" refresh everything.

jrtapper commented 9 years ago

Thanks!!

That works perfectly!