title: Combining two special jQuery functions
body: <p>I have here this jQuery code:</p>
  
  <pre><code>$(window).on("load", function(){
  $(".img-one").height($(".img-two").eq(0).width());
  $(".img-one").css("width", "auto");
  });
  
  $(window).resize(function(){
  $(".img-one").height($(".img-two").eq(0).width());
  $(".img-one").css("width", "auto");
  }).trigger("resize");
  </code></pre>
  
  <p>How is it possible to combine this <code>.on</code> and <code>.resize</code>, inclusive <code>.trigger</code>?</p>