Daren Smit Daren Smit - 2 months ago 7
CSS Question

How can i change my current code to set my div to a min-height instead of a height jQuery

Can someone help me to set my div to

min-height
instead of a normal height. Cause when I press Learn more button it will go over my
div
cause the function is made for setting a height instead of equal height.

$.fn.equalHeight = function() {
var maxHeight = 0;
return this.each(function(index, box) {
var boxHeight = $(box).height();
maxHeight = Math.max(maxHeight, boxHeight);
}).height(maxHeight);
};


http://jsfiddle.net/vVsAn/5505/

Answer

Please check the following URL where your issue has been fixed.

CSS

.equalheightz{
  background-color:#fff;
  padding:5px;
  margin:5px;

}
.phide{
  display:none;
}
h3{
  font-size:25px;
  color:#333;
  padding-bottom:5px;
}
p{
  color:#333;
  padding-bottom:5px;
}

JS :

   $(document).ready(function() {
   $('.blok1show').click(function(){
     $(this).parent().find('.phide').slideToggle('fast');

   });
});

http://jsfiddle.net/vVsAn/5506/