Added 'events' option to change the trigger event of 'update' method