I have two types of images: vertical and horizontal. Every images adjusting by js
to the height of the screen. I would like to adapt the horizontal photos to the width of the screen. Is it possible?
Here is my js code:
<script type="text/javascript">
$(document).ready(function(){
resizeDiv();
window.onresize = function(event) {
resizeDiv();
}
function resizeDiv() {
//document.body.style.overflow = "hidden";
vpw = $(window).width();
vph = $(window).height();
$('.flexslider img').css({'width': 'auto'});
$('.flexslider img').css({'height': vph + 'px'});
}
window.onload = function () {
document.body.style.overflowX = "auto";
}
});
</script>
Thanks for any help