I’m trying to make a div the same height as the parent (if the parent is larger) or make the parent the same height as the current div (if the current div is larger)
Here’s what i’ve got so far
$(this).parents().find('.address').slideToggle(function() {
$(this).parent().height($(this).parent().find('.address').height())
})
It makes the parent the height of the current div (but in my current case the parent is larger than the current div
Any ideas?
Thanks
Jamie
Check the solution here
Sample Html:
Javascript: