I have a dedicated image area on my html page. This area vary from the screen resolution. I have a javascript to resize these area accordingly. The problem is that on every reload my image is jumping to full size and back to fit which creates very nasty visual effect.
Can anyone advise me how to proceed and how to properly resize this image?
EDIT: The purpose of the resize code is to have the full height of the parent container.
var windowHeight = $(window).height() - $("#myCarousel").offset().top ;
$('#myCarousel .carousel-inner div img').css({
height: (windowHeight) + 'px'
})