Greetings. I have this jquery that assigns the height to a div in relation to a daughter image.
$(window).load(function(){
var alto = $('#bigPic img').height(); //alto de la imagen
$('#bigPic').height(alto * 1.1); }); //alto div = alto imagen * 1.1
And this one that changes the height of the div in relation to the same image only when the window size changes (not when loading the page)
$(window).resize(function () {
$('#bigPic').height($('#bigPic img').height() * 1.1);});
$(window).trigger('resize');
How would you do that to merge the two functions or that the resize works to the also when loading the page. Thank you very much.