Revert .innerHTML to .html() so inline javascript is executed -- will investigate if inline javascript can be refactored