See the Pen Events, this and for by Ignacio Vázquez (@IVZ57) on CodePen.