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