styled javascript to pass jslint