Created
December 17, 2012 02:33
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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