I want to call the function on load as well as on resize.
Is there a better way to rewrite this more compactly?
$(\'.content .right\').width($(window
I think the best solution is just to bind it also to the load event:
$(window).on('load resize', function () { $('.content .right').width( $(this).width() - 480 ); });