See the Pen behavior-api-custom-example-1 by soritesparadox (@soritesparadox) on CodePen.