I'm using the function right now where it sets the height of the container to 250px, and everything works.
But when the item expands, I want the height of the <div> to fit the text.
The parent got "overflow: hidden" and the inside div got full height underneath, but is hidden because of overflow property.
So we want this overflow:hidden; div to not hide the overflow, but fit the text.
Heres my jQuery code:
<script type='text/javascript'>
$(document).ready(function() {
var open = false;
$('#plusminus<?php echo $i; ?>').click(function() {
if (open) {
$('#item<?php echo $i; ?>').animate({height:'80px'});
$('#plusminus<?php echo $i; ?>').attr('src', './images/plus.png');
} else {
$('#item<?php echo $i; ?>').animate({height:'250px'});
$('#plusminus<?php echo $i; ?>').attr('src', './images/minus.png');
}
open = !open;
});
});
</script>
How do I fix this?
Edited by Silvar, 22 January 2013 - 04:24 PM.












