Skip to content

Instantly share code, notes, and snippets.

@DannyNunez
Created December 17, 2012 02:33
Show Gist options
  • Select an option

  • Save DannyNunez/4315426 to your computer and use it in GitHub Desktop.

Select an option

Save DannyNunez/4315426 to your computer and use it in GitHub Desktop.
Code snippet to make a div match the height of another div. Just change the div classes to match yours. .div-one = The div that needs to have it's height set via Jquery. .div-two = The div with the height that div-one needs to match.
// Drupal Version
(function ($) {
$(".div-one").css({'height':($(".div-two").height()+'px')});
})(jQuery);
//Standard JQuery
$(".div-one").css({'height':($(".div-two").height()+'px')});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment