Deixar na mesma altura


/ Published in: jQuery
Save to your folder(s)

Pega um conjunto de elementos e deixa todos da mesma altura.


Copy this code and paste it in your HTML
  1. $(function(){
  2. jQuery.fn.equalHeight = function () {
  3. var tallest = 0;
  4. this.each(function() {
  5. tallest = ($(this).height() > tallest)? $(this).height() : tallest;
  6. });
  7. return this.height(tallest);
  8. }
  9.  
  10. //Now you can call equalHeight
  11. $(".content-column").equalHeight();
  12. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.