how to join two table in codeigniter easily[updated] | ci_model | ci_controller | codeigniter 3 -datainflow
Hello guys,
I am back with a new programming article on how to set equal height of a div using JQuery so lets start :
See my example and you will see how I made it :
My HTML part is –
<style> .container { border 1px solid red; } .column { border: 1px solid blue; float:left; width: 30%; text-align:center; } </style> <div class="container"> <div class="column">big height</div> <div class="column">x</div> <div class="column">y</div> </div> <div class="container"> <div class="column">a</div> <div class="column">b</div> <div class="column">c</div> </div>
and the jquery part is –
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.container').each(function(){ var highestBox = 0; $('.column', this).each(function(){ if($(this).height() > highestBox) { highestBox = $(this).height(); } }); $('.column',this).height(highestBox); }); }); </script>
Related posts