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