i need height of image , apply height div. easy using
$(window).load(function() { var img_height = $('#image').height(); $('.some_div').css('height', img_height); });
however... image set width 100% , changes size when re-sizing browser window. possible live height of image?
$(window).resize(function () { var image_height = $('img').height(); $('div').css({ 'height': image_height }); });
here's jsfiddle uses console report image height.
Comments
Post a Comment