$(function() { var replaceContent = function( id, content ){ $( id ).replaceWith( content ); }; replaceContent( '#facultyGrid', ' ' ); });