I have three different-sized images placed side by side on my website and would like to have them resize based on the browser size using jQuery.
$(window).bind('load resize', function() {
var windowheight = $(window).height();
$('#pictures img').each(function() {
$(this).height(windowheight);
});
});
And in the CSS file I have:
#pictures img {
width:auto;
max-height:100%;
}
This code would be correct if every image had the same height, but I don't know which value to pass to the height() function considering all three images have different heights.
Any ideas?
Thanks in advance