Created
January 30, 2018 15:36
-
-
Save FinalDestiny/4c8c9ec539b4de06e140a113fca0cc0c to your computer and use it in GitHub Desktop.
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
<script type="text/javascript"> | |
function equalize_heights() { | |
var maxHeight = 0, toequalize = jQuery(".equalize").parent(); | |
toequalize.each(function() { | |
maxHeight = 0; | |
toequalize.find('.equalize').each(function(){ | |
jQuery(this).height('auto'); | |
if (jQuery(this).height() > maxHeight) { maxHeight = jQuery(this).height(); } | |
}); | |
toequalize.find(".equalize").height(maxHeight); | |
}); | |
} | |
(function($){ | |
$(document).ready(function() { | |
$('#top-menu li.current-menu-item').first().addClass('current-item'); | |
$('#top-menu li').removeClass('current-menu-item'); | |
$('#top-menu li a').click(function() { | |
$('#top-menu li').removeClass('current-item'); | |
$(this).parent().addClass('current-item'); | |
}); | |
equalize_heights(); | |
}); | |
})(jQuery); | |
jQuery(window).on('resize', function() { | |
equalize_heights(); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment