I don’t like writing jQuery but when it’s needed, extracting the behaviour out into a Basic Plugin is a clean approach