Replace .delegate with .on
Merge pull request #396 from gclx/master

Replace .delegate with .on