KevinBatdorf / liquidslider

A Responsive jQuery Content Slider
161 stars 62 forks source link

Cannot call method 'adjustHeightNoAnimation' of undefined #98

Closed ghost closed 10 years ago

ghost commented 10 years ago

I auto generate images using javascript. It overflows the panel so I want to adjust the height.

I use this code. var sliderObject = $.data( $('#slider-id')[0], 'liquidSlider'); sliderObject.adjustHeightNoAnimation();

but it gave me this error Cannot call method 'adjustHeightNoAnimation' of undefined. The sliderObject is undefined when I alert(sliderObject)

KevinBatdorf commented 10 years ago

That function was in liquid slider v2. Are you getting this from a tutorial somewhere?

Try

SliderObject.adjustHeight(true)

ghost commented 10 years ago

I don't have any error anymore. But It does not adjust the height.

KevinBatdorf commented 10 years ago

What is it doing instead? Can you show me?