When resizing the window, if the height of #cat
is less than the height of #dog
, the height of #cat
should be set equal to the height of #dog
.
$(window).resize(function() {
if ( $('#cat').height() < $('#dog').height() ) {
$('#cat').height( $('#dog').height() );
} else {
// Do nothing
}
What would the proper Jquery code be?
Could someone please assist me with this? Thanks!