Update widget.js

deleting the old event use