Skip to content

Instantly share code, notes, and snippets.

@marvinahv
Created June 26, 2013 06:57
Show Gist options
  • Save marvinahv/5865306 to your computer and use it in GitHub Desktop.
Save marvinahv/5865306 to your computer and use it in GitHub Desktop.
Code Snippet to have elements with the same height.
equalize_heights = (selector) ->
max_height = 0
$(selector).each ->
height = $(this).outerHeight()
max_height = height if height > max_height
$(selector).height(max_height)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment