Kolom Sama Tinggi dengan jQuery
$(function() {
    // set the starting `bigestHeight` variable
    var biggestHeight = 0;
    // check each of them
    $('.col').each(function() {
         // if the height of the current element is
         // bigger then the current `biggestHeight` value
         if($(this).height() > biggestHeight) {
             // update the `biggestHeight` with the
             // height of the current elements
             biggestHeight = $(this).height();
         }
    });
    // when checking for `biggestHeight` is done set that
    // height to all the elements
    $('.col').height(biggestHeight);
});<div>
  <div class="col"> … </div>
  <div class="col"> … </div>
  <div class="col"> … </div>
  <div class="col"> … </div>
</div>Sumber: Web.Enavu

2 Comments:
Versi javascriptnya ada ndak ya mas?
By Alam Perwira Putra, at Wednesday, July 27, 2016 at 2:39:00 PM GMT+7
 Alam Perwira Putra, at Wednesday, July 27, 2016 at 2:39:00 PM GMT+7
 
ketemu solusinya mas, ternyata pake css bisa. Nilai display ternyata ada table sama table-cell buat ngatur seperti tabel. Tinggal css floatnya diilangin :-bd
By Alam Perwira Putra, at Thursday, July 28, 2016 at 8:36:00 AM GMT+7
 Alam Perwira Putra, at Thursday, July 28, 2016 at 8:36:00 AM GMT+7
 
Post a Comment
<< Home