1 2 3 $( window ).resize(function() { $( "#log" ).append( "<div>Handler for .resize() called.</div>" ); });