<script>
var img = new Image();
img.src = 'images/jquery.jpg';
$(window).on("resize", function () {
$('.classname').height($('.classname').width() * img.height / img.width);
}).resize();
</script>
var img = new Image();
img.src = 'images/jquery.jpg';
$(window).on("resize", function () {
$('.classname').height($('.classname').width() * img.height / img.width);
}).resize();
</script>
No comments:
Post a Comment