Advertisement
ten80snowboarder

jQuery Fix Heights on Columns

Nov 29th, 2012
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* FIX HEIGHTS ON FOOTER COLUMNS */
  2. function sortNumber(a ,b){
  3.     return a - b;
  4. }
  5. var hColA   = $('.footerColA').height();
  6. var hColB   = $('.footerColB').height();
  7. var hColC   = $('.footerColC').height();
  8. var hCols   = [hColA, hColB, hColC];
  9. hCols       = hCols.sort(sortNumber);   // calls above function
  10. var maxHeight   = hCols[hCols.length-1];
  11. $('.footerColA').height(maxHeight);
  12. $('.footerColB').height(maxHeight);
  13. $('.footerColC').height(maxHeight);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement