Skip to content

Instantly share code, notes, and snippets.

@vikt82
Created March 11, 2015 18:33
Show Gist options
  • Select an option

  • Save vikt82/e353c242b35cddc64efb to your computer and use it in GitHub Desktop.

Select an option

Save vikt82/e353c242b35cddc64efb to your computer and use it in GitHub Desktop.

Revisions

  1. vikt82 created this gist Mar 11, 2015.
    20 changes: 20 additions & 0 deletions column_height.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    Колонки одинаковой высоты

    $(document).ready(function(){
    //set the starting bigestHeight variable
    var biggestHeight = 0;
    //check each of them
    $('.equal_height').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
    $('.equal_height').height(biggestHeight);

    });