Posted By

fabienthomas on 08/31/10


Tagged

equal heightjquery


Versions (?)

Equal height using Jquery


 / Published in: JavaScript
 

  1. jQuery(document).ready(function($) {
  2.  
  3. // equal height
  4.  
  5. function equalHeight(group) {
  6. var tallest = 0;
  7. group.each(function() {
  8. var thisHeight = $(this).height();
  9. if(thisHeight > tallest) {
  10. tallest = thisHeight;
  11. }
  12. });
  13. group.height(tallest);
  14. }
  15.  
  16. equalHeight($(".head-lines-item"));
  17.  
  18. });

Report this snippet  

You need to login to post a comment.