Refactor jQuery dependency out to an adapter