How to set the same height of every content div box horizontality using jquery?

Create a resizeBox function in javascript

Create a new function to resize the div box
function setResizeBox(){
       var max = 0;
	jQuery('.CompDetail').each(function(){
		jQuery(this).height('');
		var h = jQuery(this).height();
		max = Math.max(max, h);
	}).height(max);
}
Call it in ready function 
jQuery(document).ready(function(){
setTimeout(getMaxHeight, 0);
});
Html each contents boxs having diffent lenght content
<div class="row">
    <div class="col-md-4 col-sm-6">
	<div class="sol-box CompDetail">	
              Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore				
	</div>
    </div>
 <div class="col-md-4 col-sm-6">
	<div class="sol-box CompDetail">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud					
	</div>
    </div>
 <div class="col-md-4 col-sm-6">
	<div class="sol-box CompDetail">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occae					
	</div>
    </div>
</div>

Leave a Reply

Your email address will not be published. Required fields are marked *