jQuery.cycle with dynamic heights
i am using the
cycle plugin to fade imges that have different heights.
does anyone know how i can set the height of the outer div (s1) so that it changes according to the heights of the inner divs? Or even have it to be dynamically set to be the height of the largest inner div?
I don't want to give #s1 a height in the css because I have multiple html pages that use this effect, and images on all these pages will be different.
HTML CODE:
-
<div id="s1">
<div>image1</div>
<div>image2</div>
<div>image3</div>
</div>
JS CODE:
-
$(document).ready(function(){
$('#s1').cycle({
fx:'fade',
speed:'2000',
timeout: 0,
next:'#next', prev:'#prev'});
});